@abtnode/blocklet-services 1.16.52-beta-20250916-025146-35d976f4 → 1.16.52-beta-20250918-114058-f5efc10b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/routes/mcp.js +237 -1
- package/api/routes/oauth/server.js +4 -4
- package/api/services/mcp/server.js +1 -1
- package/dist/assets/{AdapterDayjs-CRMDLq6K.js → AdapterDayjs-Ch1GqpK7.js} +1 -1
- package/dist/assets/{Google-Co0ES_Ef.js → Google-CZPwmMCG.js} +1 -1
- package/dist/assets/{access-control-CXa4XdTR.js → access-control-CUncF5eX.js} +1 -1
- package/dist/assets/{add-component-core-C8Wvhlwd.js → add-component-core-DTRxHh-8.js} +1 -1
- package/dist/assets/{add-resource-CKVcDfq1.js → add-resource-YxBtdKAz.js} +1 -1
- package/dist/assets/{addon-CGYbwnAQ.js → addon-C-cTa3hU.js} +2 -2
- package/dist/assets/{advanced-BHQ085Rc.js → advanced-Bc2FwW94.js} +1 -1
- package/dist/assets/{aigne-CSzB6EAi.js → aigne-BmhUzMaB.js} +1 -1
- package/dist/assets/{appearance-wlMh61hK.js → appearance-KZ98aKpU.js} +1 -1
- package/dist/assets/{arrow-down.svg-2NUXhc9M.js → arrow-down.svg-DNHk5QBL.js} +1 -1
- package/dist/assets/{audit-logs-OiH-ZCCu.js → audit-logs-CToENzIH.js} +1 -1
- package/dist/assets/{authorize-C1p1aX84.js → authorize-Cr07b2RV.js} +1 -1
- package/dist/assets/{base32-Bs5DmmgZ.js → base32-9HlsUoU3.js} +1 -1
- package/dist/assets/{bind-account-CnWbtI8I.js → bind-account-DGyijOaV.js} +1 -1
- package/dist/assets/{branding-C1lgysY6.js → branding-Bop5aLE8.js} +1 -1
- package/dist/assets/{branding-BnhQzGq_.js → branding-EXYczJqB.js} +1 -1
- package/dist/assets/{branding-Bk8D93gd.js → branding-rX1QvJVq.js} +2 -2
- package/dist/assets/{bundle-avatar-CF-8YjIk.js → bundle-avatar-BhNvlq8g.js} +1 -1
- package/dist/assets/{button-bUtVfsu_.js → button-D5GaRQPz.js} +1 -1
- package/dist/assets/{click-to-copy-BWrdBff2.js → click-to-copy-Dqmzk5Lh.js} +1 -1
- package/dist/assets/{complete-C_JNPzD5.js → complete-CE-9uScC.js} +1 -1
- package/dist/assets/{component-IFve4dXC.js → component-BGn03l-s.js} +3 -3
- package/dist/assets/{config-DBzwJyqc.js → config-CLkKQ7r7.js} +1 -1
- package/dist/assets/{config-CKpqEH5r.js → config-Ce7mmKUy.js} +1 -1
- package/dist/assets/{config-BPieGs6J.js → config-CiMC747A.js} +1 -1
- package/dist/assets/{config-navigation-pmywYpni.js → config-navigation-C_bXC3i-.js} +3 -3
- package/dist/assets/{config-space-Da0MmMPn.js → config-space-B1RlBsPr.js} +1 -1
- package/dist/assets/{confirm-BSaR4_fO.js → confirm-DUjUXcfn.js} +1 -1
- package/dist/assets/{connect-9m4Nmfes.js → connect-Cd4wFjvm.js} +1 -1
- package/dist/assets/{connect-BuRk8HoH.js → connect-DWVzC8Cs.js} +1 -1
- package/dist/assets/{connect-to-DhIpK6hj.js → connect-to-DgA22hrU.js} +1 -1
- package/dist/assets/{createClass-BFCNnTU0.js → createClass-CDs8uNCX.js} +1 -1
- package/dist/assets/{dashboard-DgmOVZgS.js → dashboard-q_CEWNOG.js} +3 -3
- package/dist/assets/{delete-confirm-BR2z4Ljn.js → delete-confirm-BIF7Oky1.js} +1 -1
- package/dist/assets/{did-address-D6qV21Cc.js → did-address-CNnw4_bl.js} +1 -1
- package/dist/assets/{domain-CkwVqsGZ.js → domain-DXf6J0eN.js} +1 -1
- package/dist/assets/{domain-action-card-DmX4ipuD.js → domain-action-card-BfXWszwh.js} +1 -1
- package/dist/assets/{domains-IK6JBOMk.js → domains-CbRUCl8I.js} +1 -1
- package/dist/assets/{email-C7dt-OoA.js → email-C99N-_0O.js} +1 -1
- package/dist/assets/engine-Cc4hAHgQ.js +1 -0
- package/dist/assets/{exchange-passport-BlpeYXD-.js → exchange-passport-iJ_WwErZ.js} +1 -1
- package/dist/assets/{form-BoRGzdQH.js → form-B28GN43f.js} +1 -1
- package/dist/assets/{form-text-input-qFGxuulC.js → form-text-input-xNlMjrH6.js} +1 -1
- package/dist/assets/{fuel-DPqYXNcT.js → fuel-BTDuZSSj.js} +1 -1
- package/dist/assets/{gen-access-key-DTf8XM_B.js → gen-access-key-naR-6zBu.js} +1 -1
- package/dist/assets/{gen-simple-access-key-BHpsJW1z.js → gen-simple-access-key-C7ybjshX.js} +1 -1
- package/dist/assets/get-safe-url-PVZ8sNva.js +1 -0
- package/dist/assets/{hdkey-iF7Zd5Mt.js → hdkey-CcHIRiJU.js} +1 -1
- package/dist/assets/{home-Bq8Kaby6.js → home-BQG60l8o.js} +1 -1
- package/dist/assets/{iframe-BZdurKlN.js → iframe-sRTCxuKq.js} +1 -1
- package/dist/assets/{index-DEdn8u__.js → index-B06oP6vd.js} +1 -1
- package/dist/assets/{index-ptPisY0K.js → index-B2Y1qZ07.js} +2 -2
- package/dist/assets/{index-DGBu1iXZ.js → index-BHu1ffJP.js} +1 -1
- package/dist/assets/{index-DIzco3bK.js → index-BT7jxh7R.js} +1 -1
- package/dist/assets/{index-VRhIKoNb.js → index-BVZj6aBL.js} +1 -1
- package/dist/assets/{index-C91ORskB.js → index-BXOWDqXU.js} +1 -1
- package/dist/assets/{index-BTbAsTsB.js → index-BqyC8rPJ.js} +1 -1
- package/dist/assets/{index-DVNnjX93.js → index-CKFVrVhW.js} +1 -1
- package/dist/assets/{index-CGdAaiDX.js → index-CNvRrWdA.js} +1 -1
- package/dist/assets/{index-BUKvf-Yt.js → index-Ck6n4b0a.js} +1 -1
- package/dist/assets/{index-BJftyOWK.js → index-Co6fM09o.js} +1 -1
- package/dist/assets/{index-0r-rUxmD.js → index-CtG4EPx1.js} +1 -1
- package/dist/assets/{index-6k6hDX7K.js → index-D5Esor4q.js} +55 -55
- package/dist/assets/{index-klWBrV7H.js → index-DANBSlDF.js} +1 -1
- package/dist/assets/{index-BE6_aQqm.js → index-DDpL_qpY.js} +1 -1
- package/dist/assets/{index-CvK2LB0C.js → index-DIfIqZRw.js} +3 -3
- package/dist/assets/{index-DlbJhxX4.js → index-DL5x17V7.js} +1 -1
- package/dist/assets/{index-BioPPNyR.js → index-DP4_T7ss.js} +1 -1
- package/dist/assets/{index-DzHxtRuX.js → index-D_tcdsnn.js} +1 -1
- package/dist/assets/{index-D0zr5fnU.js → index-DbV_otyH.js} +4 -4
- package/dist/assets/{index-C7WNgxRc.js → index-De78rJ-L.js} +1 -1
- package/dist/assets/{index-BxgIheOv.js → index-DhLCZYhn.js} +1 -1
- package/dist/assets/{index-1BANSka2.js → index-DzI9kX_C.js} +1 -1
- package/dist/assets/{index-BcOGe7jx.js → index-I4fObt9S.js} +1 -1
- package/dist/assets/{index-ZScchkNG.js → index-P7sOU3FB.js} +1 -1
- package/dist/assets/{index-Cw5ltvNg.js → index-VDwida7T.js} +1 -1
- package/dist/assets/{index-DtDqVnOd.js → index-mK8LnyWX.js} +1 -1
- package/dist/assets/{invitation-BbSlWYAY.js → invitation-xW_qcQrB.js} +1 -1
- package/dist/assets/{invite-DKkAcNxp.js → invite-5NmeedgR.js} +1 -1
- package/dist/assets/{isURL-BOLVWN6q.js → isURL-DZGsNcmL.js} +1 -1
- package/dist/assets/{issue-passport-kvrsHOXO.js → issue-passport-CUjAU9Y6.js} +1 -1
- package/dist/assets/{item-CRpPGQS5.js → item-B-p0IMj0.js} +1 -1
- package/dist/assets/{landing-page-Bb2t2ubc.js → landing-page-RSi1tJUt.js} +1 -1
- package/dist/assets/{layout-O4FRf5d2.js → layout-BTKpH5C3.js} +1 -1
- package/dist/assets/{list-BeJAd6oJ.js → list-C9HtsKYw.js} +3 -3
- package/dist/assets/{list-BmwWshfg.js → list-DM_X_DbX.js} +1 -1
- package/dist/assets/localization-B-_Xdumv.js +1 -0
- package/dist/assets/{log-DwbFr2nR.js → log-ByUaGQDD.js} +1 -1
- package/dist/assets/logger-Cror7fb1.js +1 -0
- package/dist/assets/{login-D2_PE9lX.js → login-B1S8adpO.js} +1 -1
- package/dist/assets/{login-oauth-callback-BQNBl6bZ.js → login-oauth-callback-CK2OuZQv.js} +1 -1
- package/dist/assets/{logo-uploader-vRfbxowv.js → logo-uploader-DijYekzI.js} +2 -2
- package/dist/assets/{lost-passport-pY1dhWDO.js → lost-passport-wz0F5eGp.js} +1 -1
- package/dist/assets/{open-window-C0eYx4_v.js → open-window-PMr3_tpx.js} +1 -1
- package/dist/assets/{over-due-invoice-payment-OBj9thMb.js → over-due-invoice-payment-CgKEpOv9.js} +1 -1
- package/dist/assets/{overview-Rpt1OYCM.js → overview-BPXQ5NOz.js} +1 -1
- package/dist/assets/{passport-item-Bq1c8VJl.js → passport-item-CtgFdOsh.js} +1 -1
- package/dist/assets/{permission-Doi0-9cF.js → permission-DO4jN8xJ.js} +1 -1
- package/dist/assets/{preferences-zYe_BxLJ.js → preferences-FO1x_0r1.js} +1 -1
- package/dist/assets/profile-embed-BKg9ZugM.js +1 -0
- package/dist/assets/{publish-resource-CnXtK3LB.js → publish-resource-CtlORU2W.js} +1 -1
- package/dist/assets/{react-beautiful-dnd.esm-5xsARSNi.js → react-beautiful-dnd.esm-DPZZJVHP.js} +1 -1
- package/dist/assets/{runtime-DjdnpZoh.js → runtime-B0pQvnF3.js} +1 -1
- package/dist/assets/sdk-C9i2DDEJ.js +1 -0
- package/dist/assets/{security-Bdj-FYH4.js → security-CQehWrjL.js} +1 -1
- package/dist/assets/{session-D-9YOhAy.js → session-DGB-yOme.js} +1 -1
- package/dist/assets/{setup-CYAJarl4.js → setup-neejBzI5.js} +1 -1
- package/dist/assets/{spaces-Cq_dfNLt.js → spaces-CZJwyRzV.js} +1 -1
- package/dist/assets/{start-EO_1F43S.js → start-OOD_HRyM.js} +1 -1
- package/dist/assets/{starting-progress-Ck9Thp6d.js → starting-progress-C6OFR0oi.js} +1 -1
- package/dist/assets/{status-DJWbsb5u.js → status-5pZO2qoE.js} +1 -1
- package/dist/assets/{step-actions-C91dncKW.js → step-actions-C_A-deel.js} +1 -1
- package/dist/assets/{studio-B3QjabKr.js → studio-DkZBruFV.js} +1 -1
- package/dist/assets/{switch-control-o8fDOnJX.js → switch-control-XooTt-i6.js} +1 -1
- package/dist/assets/{table-tips-B7dQ0Rgb.js → table-tips-CgCabdgD.js} +1 -1
- package/dist/assets/{team-RDmDo4cZ.js → team-CGGZIbfh.js} +1 -1
- package/dist/assets/{traffic-BUIhb2HS.js → traffic-Bt0n-c6_.js} +1 -1
- package/dist/assets/{transfer-Dfbnhl7y.js → transfer-KpJ1sGgq.js} +1 -1
- package/dist/assets/{unsubscribe-Xjc5jAJO.js → unsubscribe-CF4vy-ZY.js} +1 -1
- package/dist/assets/{use-app-logo-DesKuFha.js → use-app-logo-DxlfjGOQ.js} +1 -1
- package/dist/assets/{use-window-close-CN9L863w.js → use-window-close-toR_SRTv.js} +1 -1
- package/dist/assets/{useLocalStorage-vyIYLydJ.js → useLocalStorage-CiLfInVV.js} +1 -1
- package/dist/assets/{user-center-DdBnHKdX.js → user-center-C7a4TtFt.js} +3 -3
- package/dist/assets/{user-follower-DuL1BMYz.js → user-follower-Cs8st3w5.js} +1 -1
- package/dist/assets/{user-sessions-SImh8rHV.js → user-sessions-DN1hzt8P.js} +1 -1
- package/dist/assets/{util-CHZLxs1T.js → util-CYsTlK2W.js} +1 -1
- package/dist/assets/{util-BlUZ4Q2D.js → util-CnXmjN2T.js} +1 -1
- package/dist/assets/{vendor-arcblock-C-xQV6LY.js → vendor-arcblock-DEa0A9MF.js} +1 -1
- package/dist/assets/{vendor-ux-ESjuHpb6.js → vendor-ux-pYOhjQLA.js} +1 -1
- package/dist/assets/{wait-connect-zz_yxj4x.js → wait-connect-DxmVFheW.js} +1 -1
- package/dist/assets/{wizard-CRrvtL2U.js → wizard-BvaUZfHg.js} +1 -1
- package/dist/assets/{wizard-components-CR8h5HCI.js → wizard-components-BoWnBOyn.js} +2 -2
- package/dist/assets/{wrap-locale-BraEpa0W.js → wrap-locale-DU2DJaEg.js} +1 -1
- package/dist/assets/{zh-DQDxmpdl.js → zh-CVf8x4U0.js} +1 -1
- package/dist/index.html +3 -3
- package/dist/service-worker.js +1 -1
- package/package.json +37 -37
- package/dist/assets/engine-B4t4bO94.js +0 -1
- package/dist/assets/get-safe-url-C5Vpma4S.js +0 -1
- package/dist/assets/localization-EdFO66I_.js +0 -1
- package/dist/assets/logger-DHvXC8jl.js +0 -1
- package/dist/assets/profile-embed-BqOWDoBR.js +0 -1
- package/dist/assets/sdk-ChXfsb2q.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ae as z}from"./vendor-ux-ESjuHpb6.js";function w(a){if(a===null||a===!0||a===!1)return NaN;var e=Number(a);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function s(a,e){if(e.length<a)throw new TypeError(a+" argument"+(a>1?"s":"")+" required, but only "+e.length+" present")}function f(a){s(1,arguments);var e=Object.prototype.toString.call(a);return a instanceof Date||z(a)==="object"&&e==="[object Date]"?new Date(a.getTime()):typeof a=="number"||e==="[object Number]"?new Date(a):((typeof a=="string"||e==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function se(a,e){s(2,arguments);var t=f(a),r=w(e);return isNaN(r)?new Date(NaN):(r&&t.setDate(t.getDate()+r),t)}function de(a,e){s(2,arguments);var t=f(a),r=w(e);if(isNaN(r))return new Date(NaN);if(!r)return t;var n=t.getDate(),i=new Date(t.getTime());i.setMonth(t.getMonth()+r+1,0);var o=i.getDate();return n>=o?i:(t.setFullYear(i.getFullYear(),i.getMonth(),n),t)}function le(a,e){s(2,arguments);var t=f(a).getTime(),r=w(e);return new Date(t+r)}var fe={};function C(){return fe}function Et(a,e){var t,r,n,i,o,u,l,d;s(1,arguments);var v=C(),c=w((t=(r=(n=(i=e?.weekStartsOn)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(u=o.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:v.weekStartsOn)!==null&&r!==void 0?r:(l=v.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&t!==void 0?t:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=f(a),g=h.getDay(),y=(g<c?7:0)+g-c;return h.setDate(h.getDate()-y),h.setHours(0,0,0,0),h}function ce(a){var e=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()));return e.setUTCFullYear(a.getFullYear()),a.getTime()-e.getTime()}function X(a){s(1,arguments);var e=f(a);return e.setHours(0,0,0,0),e}function Ft(a,e){s(2,arguments);var t=w(e),r=t*7;return se(a,r)}function $t(a,e){s(2,arguments);var t=w(e);return de(a,t*12)}var J=6e4,Z=36e5,It=1e3;function Ht(a,e){s(2,arguments);var t=X(a),r=X(e);return t.getTime()===r.getTime()}function ve(a){return s(1,arguments),a instanceof Date||z(a)==="object"&&Object.prototype.toString.call(a)==="[object Date]"}function me(a){if(s(1,arguments),!ve(a)&&typeof a!="number")return!1;var e=f(a);return!isNaN(Number(e))}function qt(a,e){s(2,arguments);var t=f(a),r=f(e),n=t.getFullYear()-r.getFullYear(),i=t.getMonth()-r.getMonth();return n*12+i}function Rt(a){s(1,arguments);var e=f(a),t=e.getMonth();return e.setFullYear(e.getFullYear(),t+1,0),e.setHours(23,59,59,999),e}function Lt(a){s(1,arguments);var e=f(a);return e.setDate(1),e.setHours(0,0,0,0),e}function jt(a){s(1,arguments);var e=f(a),t=e.getFullYear();return e.setFullYear(t+1,0,0),e.setHours(23,59,59,999),e}function Qt(a){s(1,arguments);var e=f(a),t=new Date(0);return t.setFullYear(e.getFullYear(),0,1),t.setHours(0,0,0,0),t}function Xt(a,e){var t,r,n,i,o,u,l,d;s(1,arguments);var v=C(),c=w((t=(r=(n=(i=e?.weekStartsOn)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(u=o.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:v.weekStartsOn)!==null&&r!==void 0?r:(l=v.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&t!==void 0?t:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=f(a),g=h.getDay(),y=(g<c?-7:0)+6-(g-c);return h.setDate(h.getDate()+y),h.setHours(23,59,59,999),h}function he(a,e){s(2,arguments);var t=w(e);return le(a,-t)}var ge=864e5;function we(a){s(1,arguments);var e=f(a),t=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime(),n=t-r;return Math.floor(n/ge)+1}function F(a){s(1,arguments);var e=1,t=f(a),r=t.getUTCDay(),n=(r<e?7:0)+r-e;return t.setUTCDate(t.getUTCDate()-n),t.setUTCHours(0,0,0,0),t}function K(a){s(1,arguments);var e=f(a),t=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(t+1,0,4),r.setUTCHours(0,0,0,0);var n=F(r),i=new Date(0);i.setUTCFullYear(t,0,4),i.setUTCHours(0,0,0,0);var o=F(i);return e.getTime()>=n.getTime()?t+1:e.getTime()>=o.getTime()?t:t-1}function ye(a){s(1,arguments);var e=K(a),t=new Date(0);t.setUTCFullYear(e,0,4),t.setUTCHours(0,0,0,0);var r=F(t);return r}var be=6048e5;function Te(a){s(1,arguments);var e=f(a),t=F(e).getTime()-ye(e).getTime();return Math.round(t/be)+1}function $(a,e){var t,r,n,i,o,u,l,d;s(1,arguments);var v=C(),c=w((t=(r=(n=(i=e?.weekStartsOn)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(u=o.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:v.weekStartsOn)!==null&&r!==void 0?r:(l=v.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&t!==void 0?t:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=f(a),g=h.getUTCDay(),y=(g<c?7:0)+g-c;return h.setUTCDate(h.getUTCDate()-y),h.setUTCHours(0,0,0,0),h}function ee(a,e){var t,r,n,i,o,u,l,d;s(1,arguments);var v=f(a),c=v.getUTCFullYear(),h=C(),g=w((t=(r=(n=(i=e?.firstWeekContainsDate)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(u=o.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:h.firstWeekContainsDate)!==null&&r!==void 0?r:(l=h.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(g>=1&&g<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(c+1,0,g),y.setUTCHours(0,0,0,0);var S=$(y,e),p=new Date(0);p.setUTCFullYear(c,0,g),p.setUTCHours(0,0,0,0);var k=$(p,e);return v.getTime()>=S.getTime()?c+1:v.getTime()>=k.getTime()?c:c-1}function De(a,e){var t,r,n,i,o,u,l,d;s(1,arguments);var v=C(),c=w((t=(r=(n=(i=e?.firstWeekContainsDate)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(u=o.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:v.firstWeekContainsDate)!==null&&r!==void 0?r:(l=v.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&t!==void 0?t:1),h=ee(a,e),g=new Date(0);g.setUTCFullYear(h,0,c),g.setUTCHours(0,0,0,0);var y=$(g,e);return y}var pe=6048e5;function Oe(a,e){s(1,arguments);var t=f(a),r=$(t,e).getTime()-De(t,e).getTime();return Math.round(r/pe)+1}function m(a,e){for(var t=a<0?"-":"",r=Math.abs(a).toString();r.length<e;)r="0"+r;return t+r}var D={y:function(e,t){var r=e.getUTCFullYear(),n=r>0?r:1-r;return m(t==="yy"?n%100:n,t.length)},M:function(e,t){var r=e.getUTCMonth();return t==="M"?String(r+1):m(r+1,2)},d:function(e,t){return m(e.getUTCDate(),t.length)},a:function(e,t){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(e,t){return m(e.getUTCHours()%12||12,t.length)},H:function(e,t){return m(e.getUTCHours(),t.length)},m:function(e,t){return m(e.getUTCMinutes(),t.length)},s:function(e,t){return m(e.getUTCSeconds(),t.length)},S:function(e,t){var r=t.length,n=e.getUTCMilliseconds(),i=Math.floor(n*Math.pow(10,r-3));return m(i,t.length)}},M={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Me={G:function(e,t,r){var n=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){var n=e.getUTCFullYear(),i=n>0?n:1-n;return r.ordinalNumber(i,{unit:"year"})}return D.y(e,t)},Y:function(e,t,r,n){var i=ee(e,n),o=i>0?i:1-i;if(t==="YY"){var u=o%100;return m(u,2)}return t==="Yo"?r.ordinalNumber(o,{unit:"year"}):m(o,t.length)},R:function(e,t){var r=K(e);return m(r,t.length)},u:function(e,t){var r=e.getUTCFullYear();return m(r,t.length)},Q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return m(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return m(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){var n=e.getUTCMonth();switch(t){case"M":case"MM":return D.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){var n=e.getUTCMonth();switch(t){case"L":return String(n+1);case"LL":return m(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){var i=Oe(e,n);return t==="wo"?r.ordinalNumber(i,{unit:"week"}):m(i,t.length)},I:function(e,t,r){var n=Te(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):m(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getUTCDate(),{unit:"date"}):D.d(e,t)},D:function(e,t,r){var n=we(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):m(n,t.length)},E:function(e,t,r){var n=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){var i=e.getUTCDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return m(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){var i=e.getUTCDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return m(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,r){var n=e.getUTCDay(),i=n===0?7:n;switch(t){case"i":return String(i);case"ii":return m(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){var n=e.getUTCHours(),i=n/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,r){var n=e.getUTCHours(),i;switch(n===12?i=M.noon:n===0?i=M.midnight:i=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,r){var n=e.getUTCHours(),i;switch(n>=17?i=M.evening:n>=12?i=M.afternoon:n>=4?i=M.morning:i=M.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){var n=e.getUTCHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return D.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getUTCHours(),{unit:"hour"}):D.H(e,t)},K:function(e,t,r){var n=e.getUTCHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):m(n,t.length)},k:function(e,t,r){var n=e.getUTCHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):m(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):D.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):D.s(e,t)},S:function(e,t){return D.S(e,t)},X:function(e,t,r,n){var i=n._originalDate||e,o=i.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return A(o);case"XXXX":case"XX":return O(o);case"XXXXX":case"XXX":default:return O(o,":")}},x:function(e,t,r,n){var i=n._originalDate||e,o=i.getTimezoneOffset();switch(t){case"x":return A(o);case"xxxx":case"xx":return O(o);case"xxxxx":case"xxx":default:return O(o,":")}},O:function(e,t,r,n){var i=n._originalDate||e,o=i.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+G(o,":");case"OOOO":default:return"GMT"+O(o,":")}},z:function(e,t,r,n){var i=n._originalDate||e,o=i.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+G(o,":");case"zzzz":default:return"GMT"+O(o,":")}},t:function(e,t,r,n){var i=n._originalDate||e,o=Math.floor(i.getTime()/1e3);return m(o,t.length)},T:function(e,t,r,n){var i=n._originalDate||e,o=i.getTime();return m(o,t.length)}};function G(a,e){var t=a>0?"-":"+",r=Math.abs(a),n=Math.floor(r/60),i=r%60;if(i===0)return t+String(n);var o=e;return t+String(n)+o+m(i,2)}function A(a,e){if(a%60===0){var t=a>0?"-":"+";return t+m(Math.abs(a)/60,2)}return O(a,e)}function O(a,e){var t=e||"",r=a>0?"-":"+",n=Math.abs(a),i=m(Math.floor(n/60),2),o=m(n%60,2);return r+i+t+o}var B=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},te=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Ce=function(e,t){var r=e.match(/(P+)(p+)?/)||[],n=r[1],i=r[2];if(!i)return B(e,t);var o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",B(n,t)).replace("{{time}}",te(i,t))},Se={p:te,P:Ce},ke=["D","DD"],Pe=["YY","YYYY"];function Ye(a){return ke.indexOf(a)!==-1}function We(a){return Pe.indexOf(a)!==-1}function V(a,e,t){if(a==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var _e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},xe=function(e,t,r){var n,i=_e[e];return typeof i=="string"?n=i:t===1?n=i.one:n=i.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function j(a){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.width?String(e.width):a.defaultWidth,r=a.formats[t]||a.formats[a.defaultWidth];return r}}var Ne={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ue={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ee={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Fe={date:j({formats:Ne,defaultWidth:"full"}),time:j({formats:Ue,defaultWidth:"full"}),dateTime:j({formats:Ee,defaultWidth:"full"})},$e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ie=function(e,t,r,n){return $e[e]};function W(a){return function(e,t){var r=t!=null&&t.context?String(t.context):"standalone",n;if(r==="formatting"&&a.formattingValues){var i=a.defaultFormattingWidth||a.defaultWidth,o=t!=null&&t.width?String(t.width):i;n=a.formattingValues[o]||a.formattingValues[i]}else{var u=a.defaultWidth,l=t!=null&&t.width?String(t.width):a.defaultWidth;n=a.values[l]||a.values[u]}var d=a.argumentCallback?a.argumentCallback(e):e;return n[d]}}var He={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},qe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Re={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Le={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},je={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Qe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Xe=function(e,t){var r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Ge={ordinalNumber:Xe,era:W({values:He,defaultWidth:"wide"}),quarter:W({values:qe,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:W({values:Re,defaultWidth:"wide"}),day:W({values:Le,defaultWidth:"wide"}),dayPeriod:W({values:je,defaultWidth:"wide",formattingValues:Qe,defaultFormattingWidth:"wide"})};function _(a){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.width,n=r&&a.matchPatterns[r]||a.matchPatterns[a.defaultMatchWidth],i=e.match(n);if(!i)return null;var o=i[0],u=r&&a.parsePatterns[r]||a.parsePatterns[a.defaultParseWidth],l=Array.isArray(u)?Be(u,function(c){return c.test(o)}):Ae(u,function(c){return c.test(o)}),d;d=a.valueCallback?a.valueCallback(l):l,d=t.valueCallback?t.valueCallback(d):d;var v=e.slice(o.length);return{value:d,rest:v}}}function Ae(a,e){for(var t in a)if(a.hasOwnProperty(t)&&e(a[t]))return t}function Be(a,e){for(var t=0;t<a.length;t++)if(e(a[t]))return t}function Ve(a){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e.match(a.matchPattern);if(!r)return null;var n=r[0],i=e.match(a.parsePattern);if(!i)return null;var o=a.valueCallback?a.valueCallback(i[0]):i[0];o=t.valueCallback?t.valueCallback(o):o;var u=e.slice(n.length);return{value:o,rest:u}}}var ze=/^(\d+)(th|st|nd|rd)?/i,Je=/\d+/i,Ze={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ke={any:[/^b/i,/^(a|c)/i]},et={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},tt={any:[/1/i,/2/i,/3/i,/4/i]},at={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},rt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},nt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},it={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ot={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ut={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},st={ordinalNumber:Ve({matchPattern:ze,parsePattern:Je,valueCallback:function(e){return parseInt(e,10)}}),era:_({matchPatterns:Ze,defaultMatchWidth:"wide",parsePatterns:Ke,defaultParseWidth:"any"}),quarter:_({matchPatterns:et,defaultMatchWidth:"wide",parsePatterns:tt,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:_({matchPatterns:at,defaultMatchWidth:"wide",parsePatterns:rt,defaultParseWidth:"any"}),day:_({matchPatterns:nt,defaultMatchWidth:"wide",parsePatterns:it,defaultParseWidth:"any"}),dayPeriod:_({matchPatterns:ot,defaultMatchWidth:"any",parsePatterns:ut,defaultParseWidth:"any"})},dt={code:"en-US",formatDistance:xe,formatLong:Fe,formatRelative:Ie,localize:Ge,match:st,options:{weekStartsOn:0,firstWeekContainsDate:1}},lt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ft=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ct=/^'([^]*?)'?$/,vt=/''/g,mt=/[a-zA-Z]/;function ht(a,e,t){var r,n,i,o,u,l,d,v,c,h,g,y,S,p,k,I,H,q;s(2,arguments);var re=String(e),P=C(),Y=(r=(n=t?.locale)!==null&&n!==void 0?n:P.locale)!==null&&r!==void 0?r:dt,R=w((i=(o=(u=(l=t?.firstWeekContainsDate)!==null&&l!==void 0?l:t==null||(d=t.locale)===null||d===void 0||(v=d.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&u!==void 0?u:P.firstWeekContainsDate)!==null&&o!==void 0?o:(c=P.locale)===null||c===void 0||(h=c.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(R>=1&&R<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var L=w((g=(y=(S=(p=t?.weekStartsOn)!==null&&p!==void 0?p:t==null||(k=t.locale)===null||k===void 0||(I=k.options)===null||I===void 0?void 0:I.weekStartsOn)!==null&&S!==void 0?S:P.weekStartsOn)!==null&&y!==void 0?y:(H=P.locale)===null||H===void 0||(q=H.options)===null||q===void 0?void 0:q.weekStartsOn)!==null&&g!==void 0?g:0);if(!(L>=0&&L<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!Y.localize)throw new RangeError("locale must contain localize property");if(!Y.formatLong)throw new RangeError("locale must contain formatLong property");var N=f(a);if(!me(N))throw new RangeError("Invalid time value");var ne=ce(N),ie=he(N,ne),oe={firstWeekContainsDate:R,weekStartsOn:L,locale:Y,_originalDate:N},ue=re.match(ft).map(function(b){var T=b[0];if(T==="p"||T==="P"){var U=Se[T];return U(b,Y.formatLong)}return b}).join("").match(lt).map(function(b){if(b==="''")return"'";var T=b[0];if(T==="'")return gt(b);var U=Me[T];if(U)return!(t!=null&&t.useAdditionalWeekYearTokens)&&We(b)&&V(b,e,String(a)),!(t!=null&&t.useAdditionalDayOfYearTokens)&&Ye(b)&&V(b,e,String(a)),U(ie,b,Y.localize,oe);if(T.match(mt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");return b}).join("");return ue}function gt(a){var e=a.match(ct);return e?e[1].replace(vt,"'"):a}const Gt=Object.freeze(Object.defineProperty({__proto__:null,default:ht},Symbol.toStringTag,{value:"Module"}));function At(a){s(1,arguments);var e=f(a),t=e.getDate();return t}function wt(a){s(1,arguments);var e=f(a),t=e.getFullYear(),r=e.getMonth(),n=new Date(0);return n.setFullYear(t,r+1,0),n.setHours(0,0,0,0),n.getDate()}function Bt(a){s(1,arguments);var e=f(a),t=e.getMonth();return t}function Vt(a){return s(1,arguments),f(a).getFullYear()}function zt(a,e){s(2,arguments);var t=f(a),r=f(e);return t.getTime()>r.getTime()}function Jt(a,e){s(2,arguments);var t=f(a),r=f(e);return t.getTime()<r.getTime()}function Zt(a,e){s(2,arguments);var t=f(a),r=f(e);return t.getFullYear()===r.getFullYear()&&t.getMonth()===r.getMonth()}function Kt(a,e){s(2,arguments);var t=f(a).getTime(),r=f(e.start).getTime(),n=f(e.end).getTime();if(!(r<=n))throw new RangeError("Invalid interval");return t>=r&&t<=n}function yt(a,e){var t;s(1,arguments);var r=w((t=e?.additionalDigits)!==null&&t!==void 0?t:2);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof a=="string"||Object.prototype.toString.call(a)==="[object String]"))return new Date(NaN);var n=pt(a),i;if(n.date){var o=Ot(n.date,r);i=Mt(o.restDateString,o.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);var u=i.getTime(),l=0,d;if(n.time&&(l=Ct(n.time),isNaN(l)))return new Date(NaN);if(n.timezone){if(d=St(n.timezone),isNaN(d))return new Date(NaN)}else{var v=new Date(u+l),c=new Date(0);return c.setFullYear(v.getUTCFullYear(),v.getUTCMonth(),v.getUTCDate()),c.setHours(v.getUTCHours(),v.getUTCMinutes(),v.getUTCSeconds(),v.getUTCMilliseconds()),c}return new Date(u+l+d)}var E={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},bt=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Tt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Dt=/^([+-])(\d{2})(?::?(\d{2}))?$/;function pt(a){var e={},t=a.split(E.dateTimeDelimiter),r;if(t.length>2)return e;if(/:/.test(t[0])?r=t[0]:(e.date=t[0],r=t[1],E.timeZoneDelimiter.test(e.date)&&(e.date=a.split(E.timeZoneDelimiter)[0],r=a.substr(e.date.length,a.length))),r){var n=E.timezone.exec(r);n?(e.time=r.replace(n[1],""),e.timezone=n[1]):e.time=r}return e}function Ot(a,e){var t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=a.match(t);if(!r)return{year:NaN,restDateString:""};var n=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?n:i*100,restDateString:a.slice((r[1]||r[2]).length)}}function Mt(a,e){if(e===null)return new Date(NaN);var t=a.match(bt);if(!t)return new Date(NaN);var r=!!t[4],n=x(t[1]),i=x(t[2])-1,o=x(t[3]),u=x(t[4]),l=x(t[5])-1;if(r)return _t(e,u,l)?kt(e,u,l):new Date(NaN);var d=new Date(0);return!Yt(e,i,o)||!Wt(e,n)?new Date(NaN):(d.setUTCFullYear(e,i,Math.max(n,o)),d)}function x(a){return a?parseInt(a):1}function Ct(a){var e=a.match(Tt);if(!e)return NaN;var t=Q(e[1]),r=Q(e[2]),n=Q(e[3]);return xt(t,r,n)?t*Z+r*J+n*1e3:NaN}function Q(a){return a&&parseFloat(a.replace(",","."))||0}function St(a){if(a==="Z")return 0;var e=a.match(Dt);if(!e)return 0;var t=e[1]==="+"?-1:1,r=parseInt(e[2]),n=e[3]&&parseInt(e[3])||0;return Nt(r,n)?t*(r*Z+n*J):NaN}function kt(a,e,t){var r=new Date(0);r.setUTCFullYear(a,0,4);var n=r.getUTCDay()||7,i=(e-1)*7+t+1-n;return r.setUTCDate(r.getUTCDate()+i),r}var Pt=[31,null,31,30,31,30,31,31,30,31,30,31];function ae(a){return a%400===0||a%4===0&&a%100!==0}function Yt(a,e,t){return e>=0&&e<=11&&t>=1&&t<=(Pt[e]||(ae(a)?29:28))}function Wt(a,e){return e>=1&&e<=(ae(a)?366:365)}function _t(a,e,t){return e>=1&&e<=53&&t>=0&&t<=6}function xt(a,e,t){return a===24?e===0&&t===0:t>=0&&t<60&&e>=0&&e<60&&a>=0&&a<25}function Nt(a,e){return e>=0&&e<=59}const ea=Object.freeze(Object.defineProperty({__proto__:null,default:yt},Symbol.toStringTag,{value:"Module"}));function ta(a,e){s(2,arguments);var t=f(a),r=w(e),n=t.getFullYear(),i=t.getDate(),o=new Date(0);o.setFullYear(n,r,15),o.setHours(0,0,0,0);var u=wt(o);return t.setMonth(r,Math.min(i,u)),t}function aa(a,e){s(2,arguments);var t=f(a),r=w(e);return isNaN(t.getTime())?new Date(NaN):(t.setFullYear(r),t)}export{le as A,w as B,X as C,ce as D,Z as E,J as F,m as G,It as H,ee as I,$ as J,F as K,Oe as L,Te as M,C as N,dt as O,Se as P,We as Q,V as R,Ye as S,he as T,wt as U,ea as V,Gt as W,se as a,Ft as b,Rt as c,Lt as d,Xt as e,jt as f,Qt as g,$t as h,Ht as i,de as j,zt as k,Kt as l,me as m,Zt as n,qt as o,yt as p,ht as q,s as r,Et as s,f as t,Jt as u,At as v,Bt as w,Vt as x,ta as y,aa as z};
|
|
1
|
+
import{ae as z}from"./vendor-ux-pYOhjQLA.js";function w(a){if(a===null||a===!0||a===!1)return NaN;var e=Number(a);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function s(a,e){if(e.length<a)throw new TypeError(a+" argument"+(a>1?"s":"")+" required, but only "+e.length+" present")}function f(a){s(1,arguments);var e=Object.prototype.toString.call(a);return a instanceof Date||z(a)==="object"&&e==="[object Date]"?new Date(a.getTime()):typeof a=="number"||e==="[object Number]"?new Date(a):((typeof a=="string"||e==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function se(a,e){s(2,arguments);var t=f(a),r=w(e);return isNaN(r)?new Date(NaN):(r&&t.setDate(t.getDate()+r),t)}function de(a,e){s(2,arguments);var t=f(a),r=w(e);if(isNaN(r))return new Date(NaN);if(!r)return t;var n=t.getDate(),i=new Date(t.getTime());i.setMonth(t.getMonth()+r+1,0);var o=i.getDate();return n>=o?i:(t.setFullYear(i.getFullYear(),i.getMonth(),n),t)}function le(a,e){s(2,arguments);var t=f(a).getTime(),r=w(e);return new Date(t+r)}var fe={};function C(){return fe}function Et(a,e){var t,r,n,i,o,u,l,d;s(1,arguments);var v=C(),c=w((t=(r=(n=(i=e?.weekStartsOn)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(u=o.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:v.weekStartsOn)!==null&&r!==void 0?r:(l=v.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&t!==void 0?t:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=f(a),g=h.getDay(),y=(g<c?7:0)+g-c;return h.setDate(h.getDate()-y),h.setHours(0,0,0,0),h}function ce(a){var e=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()));return e.setUTCFullYear(a.getFullYear()),a.getTime()-e.getTime()}function X(a){s(1,arguments);var e=f(a);return e.setHours(0,0,0,0),e}function Ft(a,e){s(2,arguments);var t=w(e),r=t*7;return se(a,r)}function $t(a,e){s(2,arguments);var t=w(e);return de(a,t*12)}var J=6e4,Z=36e5,It=1e3;function Ht(a,e){s(2,arguments);var t=X(a),r=X(e);return t.getTime()===r.getTime()}function ve(a){return s(1,arguments),a instanceof Date||z(a)==="object"&&Object.prototype.toString.call(a)==="[object Date]"}function me(a){if(s(1,arguments),!ve(a)&&typeof a!="number")return!1;var e=f(a);return!isNaN(Number(e))}function qt(a,e){s(2,arguments);var t=f(a),r=f(e),n=t.getFullYear()-r.getFullYear(),i=t.getMonth()-r.getMonth();return n*12+i}function Rt(a){s(1,arguments);var e=f(a),t=e.getMonth();return e.setFullYear(e.getFullYear(),t+1,0),e.setHours(23,59,59,999),e}function Lt(a){s(1,arguments);var e=f(a);return e.setDate(1),e.setHours(0,0,0,0),e}function jt(a){s(1,arguments);var e=f(a),t=e.getFullYear();return e.setFullYear(t+1,0,0),e.setHours(23,59,59,999),e}function Qt(a){s(1,arguments);var e=f(a),t=new Date(0);return t.setFullYear(e.getFullYear(),0,1),t.setHours(0,0,0,0),t}function Xt(a,e){var t,r,n,i,o,u,l,d;s(1,arguments);var v=C(),c=w((t=(r=(n=(i=e?.weekStartsOn)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(u=o.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:v.weekStartsOn)!==null&&r!==void 0?r:(l=v.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&t!==void 0?t:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=f(a),g=h.getDay(),y=(g<c?-7:0)+6-(g-c);return h.setDate(h.getDate()+y),h.setHours(23,59,59,999),h}function he(a,e){s(2,arguments);var t=w(e);return le(a,-t)}var ge=864e5;function we(a){s(1,arguments);var e=f(a),t=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime(),n=t-r;return Math.floor(n/ge)+1}function F(a){s(1,arguments);var e=1,t=f(a),r=t.getUTCDay(),n=(r<e?7:0)+r-e;return t.setUTCDate(t.getUTCDate()-n),t.setUTCHours(0,0,0,0),t}function K(a){s(1,arguments);var e=f(a),t=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(t+1,0,4),r.setUTCHours(0,0,0,0);var n=F(r),i=new Date(0);i.setUTCFullYear(t,0,4),i.setUTCHours(0,0,0,0);var o=F(i);return e.getTime()>=n.getTime()?t+1:e.getTime()>=o.getTime()?t:t-1}function ye(a){s(1,arguments);var e=K(a),t=new Date(0);t.setUTCFullYear(e,0,4),t.setUTCHours(0,0,0,0);var r=F(t);return r}var be=6048e5;function Te(a){s(1,arguments);var e=f(a),t=F(e).getTime()-ye(e).getTime();return Math.round(t/be)+1}function $(a,e){var t,r,n,i,o,u,l,d;s(1,arguments);var v=C(),c=w((t=(r=(n=(i=e?.weekStartsOn)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(u=o.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:v.weekStartsOn)!==null&&r!==void 0?r:(l=v.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&t!==void 0?t:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=f(a),g=h.getUTCDay(),y=(g<c?7:0)+g-c;return h.setUTCDate(h.getUTCDate()-y),h.setUTCHours(0,0,0,0),h}function ee(a,e){var t,r,n,i,o,u,l,d;s(1,arguments);var v=f(a),c=v.getUTCFullYear(),h=C(),g=w((t=(r=(n=(i=e?.firstWeekContainsDate)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(u=o.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:h.firstWeekContainsDate)!==null&&r!==void 0?r:(l=h.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(g>=1&&g<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(c+1,0,g),y.setUTCHours(0,0,0,0);var S=$(y,e),p=new Date(0);p.setUTCFullYear(c,0,g),p.setUTCHours(0,0,0,0);var k=$(p,e);return v.getTime()>=S.getTime()?c+1:v.getTime()>=k.getTime()?c:c-1}function De(a,e){var t,r,n,i,o,u,l,d;s(1,arguments);var v=C(),c=w((t=(r=(n=(i=e?.firstWeekContainsDate)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(u=o.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:v.firstWeekContainsDate)!==null&&r!==void 0?r:(l=v.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&t!==void 0?t:1),h=ee(a,e),g=new Date(0);g.setUTCFullYear(h,0,c),g.setUTCHours(0,0,0,0);var y=$(g,e);return y}var pe=6048e5;function Oe(a,e){s(1,arguments);var t=f(a),r=$(t,e).getTime()-De(t,e).getTime();return Math.round(r/pe)+1}function m(a,e){for(var t=a<0?"-":"",r=Math.abs(a).toString();r.length<e;)r="0"+r;return t+r}var D={y:function(e,t){var r=e.getUTCFullYear(),n=r>0?r:1-r;return m(t==="yy"?n%100:n,t.length)},M:function(e,t){var r=e.getUTCMonth();return t==="M"?String(r+1):m(r+1,2)},d:function(e,t){return m(e.getUTCDate(),t.length)},a:function(e,t){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(e,t){return m(e.getUTCHours()%12||12,t.length)},H:function(e,t){return m(e.getUTCHours(),t.length)},m:function(e,t){return m(e.getUTCMinutes(),t.length)},s:function(e,t){return m(e.getUTCSeconds(),t.length)},S:function(e,t){var r=t.length,n=e.getUTCMilliseconds(),i=Math.floor(n*Math.pow(10,r-3));return m(i,t.length)}},M={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Me={G:function(e,t,r){var n=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){var n=e.getUTCFullYear(),i=n>0?n:1-n;return r.ordinalNumber(i,{unit:"year"})}return D.y(e,t)},Y:function(e,t,r,n){var i=ee(e,n),o=i>0?i:1-i;if(t==="YY"){var u=o%100;return m(u,2)}return t==="Yo"?r.ordinalNumber(o,{unit:"year"}):m(o,t.length)},R:function(e,t){var r=K(e);return m(r,t.length)},u:function(e,t){var r=e.getUTCFullYear();return m(r,t.length)},Q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return m(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return m(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){var n=e.getUTCMonth();switch(t){case"M":case"MM":return D.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){var n=e.getUTCMonth();switch(t){case"L":return String(n+1);case"LL":return m(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){var i=Oe(e,n);return t==="wo"?r.ordinalNumber(i,{unit:"week"}):m(i,t.length)},I:function(e,t,r){var n=Te(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):m(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getUTCDate(),{unit:"date"}):D.d(e,t)},D:function(e,t,r){var n=we(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):m(n,t.length)},E:function(e,t,r){var n=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){var i=e.getUTCDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return m(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){var i=e.getUTCDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return m(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,r){var n=e.getUTCDay(),i=n===0?7:n;switch(t){case"i":return String(i);case"ii":return m(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){var n=e.getUTCHours(),i=n/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,r){var n=e.getUTCHours(),i;switch(n===12?i=M.noon:n===0?i=M.midnight:i=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,r){var n=e.getUTCHours(),i;switch(n>=17?i=M.evening:n>=12?i=M.afternoon:n>=4?i=M.morning:i=M.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){var n=e.getUTCHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return D.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getUTCHours(),{unit:"hour"}):D.H(e,t)},K:function(e,t,r){var n=e.getUTCHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):m(n,t.length)},k:function(e,t,r){var n=e.getUTCHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):m(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):D.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):D.s(e,t)},S:function(e,t){return D.S(e,t)},X:function(e,t,r,n){var i=n._originalDate||e,o=i.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return A(o);case"XXXX":case"XX":return O(o);case"XXXXX":case"XXX":default:return O(o,":")}},x:function(e,t,r,n){var i=n._originalDate||e,o=i.getTimezoneOffset();switch(t){case"x":return A(o);case"xxxx":case"xx":return O(o);case"xxxxx":case"xxx":default:return O(o,":")}},O:function(e,t,r,n){var i=n._originalDate||e,o=i.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+G(o,":");case"OOOO":default:return"GMT"+O(o,":")}},z:function(e,t,r,n){var i=n._originalDate||e,o=i.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+G(o,":");case"zzzz":default:return"GMT"+O(o,":")}},t:function(e,t,r,n){var i=n._originalDate||e,o=Math.floor(i.getTime()/1e3);return m(o,t.length)},T:function(e,t,r,n){var i=n._originalDate||e,o=i.getTime();return m(o,t.length)}};function G(a,e){var t=a>0?"-":"+",r=Math.abs(a),n=Math.floor(r/60),i=r%60;if(i===0)return t+String(n);var o=e;return t+String(n)+o+m(i,2)}function A(a,e){if(a%60===0){var t=a>0?"-":"+";return t+m(Math.abs(a)/60,2)}return O(a,e)}function O(a,e){var t=e||"",r=a>0?"-":"+",n=Math.abs(a),i=m(Math.floor(n/60),2),o=m(n%60,2);return r+i+t+o}var B=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},te=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Ce=function(e,t){var r=e.match(/(P+)(p+)?/)||[],n=r[1],i=r[2];if(!i)return B(e,t);var o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",B(n,t)).replace("{{time}}",te(i,t))},Se={p:te,P:Ce},ke=["D","DD"],Pe=["YY","YYYY"];function Ye(a){return ke.indexOf(a)!==-1}function We(a){return Pe.indexOf(a)!==-1}function V(a,e,t){if(a==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var _e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},xe=function(e,t,r){var n,i=_e[e];return typeof i=="string"?n=i:t===1?n=i.one:n=i.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function j(a){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.width?String(e.width):a.defaultWidth,r=a.formats[t]||a.formats[a.defaultWidth];return r}}var Ne={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ue={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ee={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Fe={date:j({formats:Ne,defaultWidth:"full"}),time:j({formats:Ue,defaultWidth:"full"}),dateTime:j({formats:Ee,defaultWidth:"full"})},$e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ie=function(e,t,r,n){return $e[e]};function W(a){return function(e,t){var r=t!=null&&t.context?String(t.context):"standalone",n;if(r==="formatting"&&a.formattingValues){var i=a.defaultFormattingWidth||a.defaultWidth,o=t!=null&&t.width?String(t.width):i;n=a.formattingValues[o]||a.formattingValues[i]}else{var u=a.defaultWidth,l=t!=null&&t.width?String(t.width):a.defaultWidth;n=a.values[l]||a.values[u]}var d=a.argumentCallback?a.argumentCallback(e):e;return n[d]}}var He={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},qe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Re={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Le={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},je={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Qe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Xe=function(e,t){var r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Ge={ordinalNumber:Xe,era:W({values:He,defaultWidth:"wide"}),quarter:W({values:qe,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:W({values:Re,defaultWidth:"wide"}),day:W({values:Le,defaultWidth:"wide"}),dayPeriod:W({values:je,defaultWidth:"wide",formattingValues:Qe,defaultFormattingWidth:"wide"})};function _(a){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.width,n=r&&a.matchPatterns[r]||a.matchPatterns[a.defaultMatchWidth],i=e.match(n);if(!i)return null;var o=i[0],u=r&&a.parsePatterns[r]||a.parsePatterns[a.defaultParseWidth],l=Array.isArray(u)?Be(u,function(c){return c.test(o)}):Ae(u,function(c){return c.test(o)}),d;d=a.valueCallback?a.valueCallback(l):l,d=t.valueCallback?t.valueCallback(d):d;var v=e.slice(o.length);return{value:d,rest:v}}}function Ae(a,e){for(var t in a)if(a.hasOwnProperty(t)&&e(a[t]))return t}function Be(a,e){for(var t=0;t<a.length;t++)if(e(a[t]))return t}function Ve(a){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e.match(a.matchPattern);if(!r)return null;var n=r[0],i=e.match(a.parsePattern);if(!i)return null;var o=a.valueCallback?a.valueCallback(i[0]):i[0];o=t.valueCallback?t.valueCallback(o):o;var u=e.slice(n.length);return{value:o,rest:u}}}var ze=/^(\d+)(th|st|nd|rd)?/i,Je=/\d+/i,Ze={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ke={any:[/^b/i,/^(a|c)/i]},et={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},tt={any:[/1/i,/2/i,/3/i,/4/i]},at={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},rt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},nt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},it={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ot={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ut={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},st={ordinalNumber:Ve({matchPattern:ze,parsePattern:Je,valueCallback:function(e){return parseInt(e,10)}}),era:_({matchPatterns:Ze,defaultMatchWidth:"wide",parsePatterns:Ke,defaultParseWidth:"any"}),quarter:_({matchPatterns:et,defaultMatchWidth:"wide",parsePatterns:tt,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:_({matchPatterns:at,defaultMatchWidth:"wide",parsePatterns:rt,defaultParseWidth:"any"}),day:_({matchPatterns:nt,defaultMatchWidth:"wide",parsePatterns:it,defaultParseWidth:"any"}),dayPeriod:_({matchPatterns:ot,defaultMatchWidth:"any",parsePatterns:ut,defaultParseWidth:"any"})},dt={code:"en-US",formatDistance:xe,formatLong:Fe,formatRelative:Ie,localize:Ge,match:st,options:{weekStartsOn:0,firstWeekContainsDate:1}},lt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ft=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ct=/^'([^]*?)'?$/,vt=/''/g,mt=/[a-zA-Z]/;function ht(a,e,t){var r,n,i,o,u,l,d,v,c,h,g,y,S,p,k,I,H,q;s(2,arguments);var re=String(e),P=C(),Y=(r=(n=t?.locale)!==null&&n!==void 0?n:P.locale)!==null&&r!==void 0?r:dt,R=w((i=(o=(u=(l=t?.firstWeekContainsDate)!==null&&l!==void 0?l:t==null||(d=t.locale)===null||d===void 0||(v=d.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&u!==void 0?u:P.firstWeekContainsDate)!==null&&o!==void 0?o:(c=P.locale)===null||c===void 0||(h=c.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(R>=1&&R<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var L=w((g=(y=(S=(p=t?.weekStartsOn)!==null&&p!==void 0?p:t==null||(k=t.locale)===null||k===void 0||(I=k.options)===null||I===void 0?void 0:I.weekStartsOn)!==null&&S!==void 0?S:P.weekStartsOn)!==null&&y!==void 0?y:(H=P.locale)===null||H===void 0||(q=H.options)===null||q===void 0?void 0:q.weekStartsOn)!==null&&g!==void 0?g:0);if(!(L>=0&&L<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!Y.localize)throw new RangeError("locale must contain localize property");if(!Y.formatLong)throw new RangeError("locale must contain formatLong property");var N=f(a);if(!me(N))throw new RangeError("Invalid time value");var ne=ce(N),ie=he(N,ne),oe={firstWeekContainsDate:R,weekStartsOn:L,locale:Y,_originalDate:N},ue=re.match(ft).map(function(b){var T=b[0];if(T==="p"||T==="P"){var U=Se[T];return U(b,Y.formatLong)}return b}).join("").match(lt).map(function(b){if(b==="''")return"'";var T=b[0];if(T==="'")return gt(b);var U=Me[T];if(U)return!(t!=null&&t.useAdditionalWeekYearTokens)&&We(b)&&V(b,e,String(a)),!(t!=null&&t.useAdditionalDayOfYearTokens)&&Ye(b)&&V(b,e,String(a)),U(ie,b,Y.localize,oe);if(T.match(mt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");return b}).join("");return ue}function gt(a){var e=a.match(ct);return e?e[1].replace(vt,"'"):a}const Gt=Object.freeze(Object.defineProperty({__proto__:null,default:ht},Symbol.toStringTag,{value:"Module"}));function At(a){s(1,arguments);var e=f(a),t=e.getDate();return t}function wt(a){s(1,arguments);var e=f(a),t=e.getFullYear(),r=e.getMonth(),n=new Date(0);return n.setFullYear(t,r+1,0),n.setHours(0,0,0,0),n.getDate()}function Bt(a){s(1,arguments);var e=f(a),t=e.getMonth();return t}function Vt(a){return s(1,arguments),f(a).getFullYear()}function zt(a,e){s(2,arguments);var t=f(a),r=f(e);return t.getTime()>r.getTime()}function Jt(a,e){s(2,arguments);var t=f(a),r=f(e);return t.getTime()<r.getTime()}function Zt(a,e){s(2,arguments);var t=f(a),r=f(e);return t.getFullYear()===r.getFullYear()&&t.getMonth()===r.getMonth()}function Kt(a,e){s(2,arguments);var t=f(a).getTime(),r=f(e.start).getTime(),n=f(e.end).getTime();if(!(r<=n))throw new RangeError("Invalid interval");return t>=r&&t<=n}function yt(a,e){var t;s(1,arguments);var r=w((t=e?.additionalDigits)!==null&&t!==void 0?t:2);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof a=="string"||Object.prototype.toString.call(a)==="[object String]"))return new Date(NaN);var n=pt(a),i;if(n.date){var o=Ot(n.date,r);i=Mt(o.restDateString,o.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);var u=i.getTime(),l=0,d;if(n.time&&(l=Ct(n.time),isNaN(l)))return new Date(NaN);if(n.timezone){if(d=St(n.timezone),isNaN(d))return new Date(NaN)}else{var v=new Date(u+l),c=new Date(0);return c.setFullYear(v.getUTCFullYear(),v.getUTCMonth(),v.getUTCDate()),c.setHours(v.getUTCHours(),v.getUTCMinutes(),v.getUTCSeconds(),v.getUTCMilliseconds()),c}return new Date(u+l+d)}var E={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},bt=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Tt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Dt=/^([+-])(\d{2})(?::?(\d{2}))?$/;function pt(a){var e={},t=a.split(E.dateTimeDelimiter),r;if(t.length>2)return e;if(/:/.test(t[0])?r=t[0]:(e.date=t[0],r=t[1],E.timeZoneDelimiter.test(e.date)&&(e.date=a.split(E.timeZoneDelimiter)[0],r=a.substr(e.date.length,a.length))),r){var n=E.timezone.exec(r);n?(e.time=r.replace(n[1],""),e.timezone=n[1]):e.time=r}return e}function Ot(a,e){var t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=a.match(t);if(!r)return{year:NaN,restDateString:""};var n=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?n:i*100,restDateString:a.slice((r[1]||r[2]).length)}}function Mt(a,e){if(e===null)return new Date(NaN);var t=a.match(bt);if(!t)return new Date(NaN);var r=!!t[4],n=x(t[1]),i=x(t[2])-1,o=x(t[3]),u=x(t[4]),l=x(t[5])-1;if(r)return _t(e,u,l)?kt(e,u,l):new Date(NaN);var d=new Date(0);return!Yt(e,i,o)||!Wt(e,n)?new Date(NaN):(d.setUTCFullYear(e,i,Math.max(n,o)),d)}function x(a){return a?parseInt(a):1}function Ct(a){var e=a.match(Tt);if(!e)return NaN;var t=Q(e[1]),r=Q(e[2]),n=Q(e[3]);return xt(t,r,n)?t*Z+r*J+n*1e3:NaN}function Q(a){return a&&parseFloat(a.replace(",","."))||0}function St(a){if(a==="Z")return 0;var e=a.match(Dt);if(!e)return 0;var t=e[1]==="+"?-1:1,r=parseInt(e[2]),n=e[3]&&parseInt(e[3])||0;return Nt(r,n)?t*(r*Z+n*J):NaN}function kt(a,e,t){var r=new Date(0);r.setUTCFullYear(a,0,4);var n=r.getUTCDay()||7,i=(e-1)*7+t+1-n;return r.setUTCDate(r.getUTCDate()+i),r}var Pt=[31,null,31,30,31,30,31,31,30,31,30,31];function ae(a){return a%400===0||a%4===0&&a%100!==0}function Yt(a,e,t){return e>=0&&e<=11&&t>=1&&t<=(Pt[e]||(ae(a)?29:28))}function Wt(a,e){return e>=1&&e<=(ae(a)?366:365)}function _t(a,e,t){return e>=1&&e<=53&&t>=0&&t<=6}function xt(a,e,t){return a===24?e===0&&t===0:t>=0&&t<60&&e>=0&&e<60&&a>=0&&a<25}function Nt(a,e){return e>=0&&e<=59}const ea=Object.freeze(Object.defineProperty({__proto__:null,default:yt},Symbol.toStringTag,{value:"Module"}));function ta(a,e){s(2,arguments);var t=f(a),r=w(e),n=t.getFullYear(),i=t.getDate(),o=new Date(0);o.setFullYear(n,r,15),o.setHours(0,0,0,0);var u=wt(o);return t.setMonth(r,Math.min(i,u)),t}function aa(a,e){s(2,arguments);var t=f(a),r=w(e);return isNaN(t.getTime())?new Date(NaN):(t.setFullYear(r),t)}export{le as A,w as B,X as C,ce as D,Z as E,J as F,m as G,It as H,ee as I,$ as J,F as K,Oe as L,Te as M,C as N,dt as O,Se as P,We as Q,V as R,Ye as S,he as T,wt as U,ea as V,Gt as W,se as a,Ft as b,Rt as c,Lt as d,Xt as e,jt as f,Qt as g,$t as h,Ht as i,de as j,zt as k,Kt as l,me as m,Zt as n,qt as o,yt as p,ht as q,s as r,Et as s,f as t,Jt as u,At as v,Bt as w,Vt as x,ta as y,aa as z};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{M as m,j as e,Q as c,bf as B,P as C,ai as E,o as I,bg as P,O as z}from"./vendor-mui-core-CmD-NPnl.js";import{r as o}from"./vendor-react-Dvs43sk9.js";import{n as A}from"./vendor-utils-DQK0pEML.js";import{l as p}from"./vendor-ux-
|
|
1
|
+
import{M as m,j as e,Q as c,bf as B,P as C,ai as E,o as I,bg as P,O as z}from"./vendor-mui-core-CmD-NPnl.js";import{r as o}from"./vendor-react-Dvs43sk9.js";import{n as A}from"./vendor-utils-DQK0pEML.js";import{l as p}from"./vendor-ux-pYOhjQLA.js";function L({...r}){const{size:d="medium",color:i="primary",menu:a=[],children:s=null,variant:u="contained",onClick:x=A,menuButtonProps:f={},...h}=r,[g,l]=o.useState(!1),n=o.useRef(null),j=Array.isArray(a)?a.map((t,b)=>o.isValidElement(t)?t:o.createElement(m,{...t,key:b})):a,M=()=>{l(t=>!t)},y=t=>{n.current&&n.current.contains(t.target)||l(!1)},k=t=>{t.target.closest(".MuiMenuItem-root")&&l(!1)};return e.jsxs(e.Fragment,{children:[e.jsxs(v,{variant:u,size:d,color:i,ref:n,...h,children:[typeof s=="function"?s():e.jsx(c,{onClick:x,color:i,children:s}),e.jsx(c,{onClick:M,color:i,...f,"aria-label":"more functions",children:e.jsx(B,{})})]}),e.jsx(w,{open:g,anchorEl:n.current,placement:"bottom-end",disablePortal:!1,children:e.jsx(C,{children:e.jsx(E,{onClickAway:y,children:e.jsx(I,{onClick:k,children:j})})})})]})}L.Item=m;const v=p(P)`
|
|
2
2
|
> .MuiButtonBase-root:last-of-type {
|
|
3
3
|
min-width: 2em;
|
|
4
4
|
padding-left: 0;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as y,t as fr,g as hr,e as gr}from"./vendor-react-Dvs43sk9.js";import{j as e,ak as O,y as Me,x as _e,bb as We,M as Ce,T as X,z as pe,bC as Ze,aX as ie,a6 as ae,W as b,at as z,aj as xr,aI as yr,D as vr,cf as je,bp as br,b6 as Pt,bq as Cr,am as fe,bZ as dt,P as jr,Q as It,bW as Sr,ds as wr,ch as kr,aO as Pr,aP as Ir,dt as Tr,I as Er,dn as Ar,bL as Dr,du as Rr,a5 as Lr}from"./vendor-mui-core-CmD-NPnl.js";import{B as qe,e as $e,K as Or,ad as Nr,n as ut,C as Ur,a as Fr}from"./vendor-utils-DQK0pEML.js";import{T as Z,$ as Br,J as Mr,H as Y,F as re,D as $,G as ge,O as Tt,ab as _r,L as Wr,a6 as ze,ac as Et,ai as qr}from"./vendor-ux-ESjuHpb6.js";import{bd as Qe,aA as At,av as $r,aB as zr,bS as Hr,bT as Kr,Z as K,bU as Se,p as he,ap as He,W as Vr,v as Zr,aM as Qr,B as ne,bV as Yr,bW as Gr,a8 as Dt,c as te,b9 as Xr,a5 as Jr,X as se,bX as Rt,ar as es,aZ as Lt,bY as ts}from"./index-6k6hDX7K.js";import{B as Ot,o as rs,l as Nt}from"./index-BE6_aQqm.js";import{x as ss,b as Ye,g as ke,c as ns,h as os,a as is}from"./vendor-hooks-DLNZ8kxG.js";import{C as Ut,P as as}from"./user-sessions-SImh8rHV.js";import{r as ls}from"./hdkey-iF7Zd5Mt.js";import{W as Ft}from"./dashboard-DgmOVZgS.js";import{W as Ge}from"./did-address-D6qV21Cc.js";import{u as Q}from"./team-RDmDo4cZ.js";import{u as le}from"./session-D-9YOhAy.js";import{P as J}from"./permission-Doi0-9cF.js";import{C as Pe}from"./click-to-copy-BWrdBff2.js";import{T as Bt}from"./index-DlbJhxX4.js";import{f as ee}from"./index-DBs9Ljax.js";import{u as cs}from"./useAsync-DZevTxbv.js";import{v as H}from"./index-1BANSka2.js";import{C as xe}from"./confirm-BSaR4_fO.js";import{N as ds}from"./index-VRhIKoNb.js";import{i as Mt,a as we,p as _t}from"./util-CHZLxs1T.js";import{b as us}from"./sdk-ChXfsb2q.js";import{U as ms}from"./user-follower-DuL1BMYz.js";import{A as ps}from"./actions-CL4xTGOh.js";import{S as fs}from"./shorten-label-Cbu8wo9m.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-C-xQV6LY.js";import"./useLocalStorage-vyIYLydJ.js";import"./get-safe-url-C5Vpma4S.js";import"./useAsyncRetry-6TjWJyO6.js";import"./useAsync-CNAYLnLm.js";import"./useSetState-DFuQZPPV.js";import"./index-BxgIheOv.js";import"./over-due-invoice-payment-OBj9thMb.js";import"./use-mobile-CQ7Tw4aD.js";import"./isURL-BOLVWN6q.js";import"./use-app-logo-DesKuFha.js";import"./arrow-down.svg-2NUXhc9M.js";import"./vendor-mui-x--K2rEM1j.js";import"./AdapterDayjs-CRMDLq6K.js";import"./base32-Bs5DmmgZ.js";import"./use-mobile-D93Bk2Ru.js";const Wt=t=>y.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",...t},y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.88619 1.875C5.0541 1.875 4.24071 2.12174 3.54885 2.58402C2.857 3.0463 2.31777 3.70336 1.99934 4.47211C1.68092 5.24085 1.5976 6.08676 1.75994 6.90285C1.92227 7.71895 2.32295 8.46858 2.91133 9.05695C3.4997 9.64532 4.24933 10.046 5.06543 10.2083C5.88152 10.3707 6.72743 10.2874 7.49617 9.96893C8.26492 9.65051 8.92198 9.11128 9.38426 8.41942C9.84654 7.72757 10.0933 6.91417 10.0933 6.08209C10.0933 4.9663 9.65003 3.89621 8.86105 3.10723C8.07207 2.31825 7.00198 1.875 5.88619 1.875ZM4.11182 4.30773C4.58242 3.83714 5.22067 3.57276 5.88619 3.57276C6.38249 3.57276 6.86764 3.71993 7.2803 3.99566C7.69295 4.27139 8.01458 4.66329 8.20451 5.12181C8.39443 5.58033 8.44413 6.08487 8.3473 6.57164C8.25048 7.0584 8.01149 7.50552 7.66055 7.85645C7.30962 8.20739 6.8625 8.44638 6.37574 8.5432C5.88897 8.64003 5.38443 8.59033 4.92591 8.40041C4.46739 8.21048 4.07549 7.88885 3.79976 7.4762C3.52403 7.06354 3.37686 6.57839 3.37686 6.08209C3.37686 5.41657 3.64123 4.77832 4.11182 4.30773ZM4.20709 10.8302C3.0913 10.8302 2.02121 11.2735 1.23223 12.0624C0.443246 12.8514 0 13.9215 0 15.0373V17.8358C0 17.9955 0.12947 18.125 0.289179 18.125H1.40858C1.56829 18.125 1.69776 17.9955 1.69776 17.8358V15.0373C1.69776 14.3718 1.96214 13.7335 2.43273 13.2629C2.90332 12.7924 3.54157 12.528 4.20709 12.528H7.5653C7.89483 12.528 8.22113 12.5929 8.52558 12.719C8.83002 12.8451 9.10665 13.0299 9.33966 13.2629C9.57267 13.496 9.75751 13.7726 9.88361 14.077C10.0097 14.3815 10.0746 14.7078 10.0746 15.0373V17.8358C10.0746 17.9955 10.2041 18.125 10.3638 18.125H11.4832C11.6429 18.125 11.7724 17.9955 11.7724 17.8358V15.0373C11.7724 13.9215 11.3291 12.8514 10.5402 12.0624C9.75118 11.2735 8.68109 10.8302 7.5653 10.8302H4.20709Z"}),y.createElement("rect",{x:12.5,y:9.375,width:7.5,height:1.875,rx:.9375}),y.createElement("rect",{x:15.3125,y:14.0625,width:7.5,height:1.875,rx:.9375,transform:"rotate(-90 15.3125 14.0625)"})),qt=t=>y.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",...t},y.createElement("path",{d:"M1.25 2.7087C1.25 2.24826 1.62326 1.875 2.0837 1.875H14.339C14.7995 1.875 15.1727 2.24826 15.1727 2.7087V9.31574C15.1727 9.77618 14.7995 10.1494 14.339 10.1494C13.8786 10.1494 13.5053 9.77618 13.5053 9.31574V3.54239H2.91739V16.7565H6.53772H8.34788H9.32435C9.78479 16.7565 10.158 17.1297 10.158 17.5902C10.158 18.0506 9.78479 18.4239 9.32435 18.4239H8.34788H2.0837C1.62326 18.4239 1.25 18.0506 1.25 17.5902V2.7087Z"}),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.21129 7.91935C7.70481 7.91935 7.29422 8.32993 7.29422 8.83641C7.29422 9.34289 7.70481 9.75348 8.21129 9.75348C8.71777 9.75348 9.12836 9.34289 9.12836 8.83641C9.12836 8.32993 8.71777 7.91935 8.21129 7.91935ZM5.62683 8.83641C5.62683 7.40905 6.78393 6.25195 8.21129 6.25195C9.63865 6.25195 10.7957 7.40905 10.7957 8.83641C10.7957 10.2638 9.63865 11.4209 8.21129 11.4209C6.78393 11.4209 5.62683 10.2638 5.62683 8.83641Z"}),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.62683 13.2133C5.62683 12.7529 6.00009 12.3796 6.46053 12.3796H9.96205C10.4225 12.3796 10.7957 12.7529 10.7957 13.2133C10.7957 13.6737 10.4225 14.047 9.96205 14.047H6.46053C6.00009 14.047 5.62683 13.6737 5.62683 13.2133Z"}),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.6406 11.3125C15.8547 11.3125 16.0503 11.434 16.145 11.626L17.1779 13.7184L19.4876 14.056C19.6994 14.087 19.8753 14.2355 19.9413 14.4391C20.0074 14.6427 19.9521 14.8662 19.7987 15.0156L18.1279 16.643L18.5222 18.9421C18.5584 19.1532 18.4716 19.3665 18.2984 19.4923C18.1252 19.6182 17.8955 19.6347 17.706 19.5351L15.6406 18.4489L13.5753 19.5351C13.3858 19.6347 13.1561 19.6182 12.9829 19.4923C12.8096 19.3665 12.7229 19.1532 12.7591 18.9421L13.1534 16.643L11.4825 15.0156C11.3292 14.8662 11.2739 14.6427 11.3399 14.4391C11.406 14.2355 11.5818 14.087 11.7937 14.056L14.1034 13.7184L15.1362 11.626C15.231 11.434 15.4265 11.3125 15.6406 11.3125ZM15.6406 13.1458L14.9815 14.4813C14.8996 14.6471 14.7414 14.7621 14.5584 14.7889L13.0835 15.0044L14.1503 16.0435C14.283 16.1727 14.3435 16.359 14.3122 16.5416L14.0606 18.0088L15.3788 17.3155C15.5427 17.2293 15.7386 17.2293 15.9025 17.3155L17.2207 18.0088L16.969 16.5416C16.9377 16.359 16.9983 16.1727 17.131 16.0435L18.1978 15.0044L16.7229 14.7889C16.5399 14.7621 16.3817 14.6471 16.2998 14.4813L15.6406 13.1458Z"})),$t=t=>y.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",...t},y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.88619 1.875C5.0541 1.875 4.24071 2.12174 3.54885 2.58402C2.857 3.0463 2.31777 3.70336 1.99934 4.47211C1.68092 5.24085 1.5976 6.08676 1.75994 6.90285C1.92227 7.71895 2.32295 8.46858 2.91133 9.05695C3.4997 9.64532 4.24933 10.046 5.06543 10.2083C5.88152 10.3707 6.72743 10.2874 7.49617 9.96893C8.26492 9.65051 8.92198 9.11128 9.38426 8.41942C9.84654 7.72757 10.0933 6.91417 10.0933 6.08209C10.0933 4.9663 9.65003 3.89621 8.86105 3.10723C8.07207 2.31825 7.00198 1.875 5.88619 1.875ZM4.11182 4.30773C4.58242 3.83714 5.22067 3.57276 5.88619 3.57276C6.38249 3.57276 6.86764 3.71993 7.2803 3.99566C7.69295 4.27139 8.01458 4.66329 8.20451 5.12181C8.39443 5.58033 8.44413 6.08487 8.3473 6.57164C8.25048 7.0584 8.01149 7.50552 7.66055 7.85645C7.30962 8.20739 6.8625 8.44638 6.37574 8.5432C5.88897 8.64003 5.38443 8.59033 4.92591 8.40041C4.46739 8.21048 4.07549 7.88885 3.79976 7.4762C3.52403 7.06354 3.37686 6.57839 3.37686 6.08209C3.37686 5.41657 3.64123 4.77832 4.11182 4.30773ZM4.20709 10.8302C3.0913 10.8302 2.02121 11.2735 1.23223 12.0624C0.443246 12.8514 0 13.9215 0 15.0373V17.8358C0 17.9955 0.12947 18.125 0.289179 18.125H1.40858C1.56829 18.125 1.69776 17.9955 1.69776 17.8358V15.0373C1.69776 14.3718 1.96214 13.7335 2.43273 13.2629C2.90332 12.7924 3.54157 12.528 4.20709 12.528H7.5653C7.89483 12.528 8.22113 12.5929 8.52558 12.719C8.83002 12.8451 9.10665 13.0299 9.33966 13.2629C9.57267 13.496 9.75751 13.7726 9.88361 14.077C10.0097 14.3815 10.0746 14.7078 10.0746 15.0373V17.8358C10.0746 17.9955 10.2041 18.125 10.3638 18.125H11.4832C11.6429 18.125 11.7724 17.9955 11.7724 17.8358V15.0373C11.7724 13.9215 11.3291 12.8514 10.5402 12.0624C9.75118 11.2735 8.68109 10.8302 7.5653 10.8302H4.20709Z"}),y.createElement("rect",{x:12.5,y:9.375,width:7.5,height:1.875,rx:.9375})),hs=t=>y.createElement("svg",{width:18,height:19,viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg",...t},y.createElement("g",{clipPath:"url(#clip0)"},y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.99997 1.59778C8.19071 1.59778 7.39961 1.83775 6.72673 2.28736C6.05385 2.73697 5.5294 3.37601 5.21971 4.12367C4.91001 4.87134 4.82898 5.69405 4.98686 6.48777C5.14474 7.28149 5.53444 8.01056 6.10668 8.5828C6.67892 9.15504 7.408 9.54474 8.20172 9.70262C8.99544 9.8605 9.81815 9.77947 10.5658 9.46978C11.3135 9.16009 11.9525 8.63564 12.4021 7.96276C12.8517 7.28987 13.0917 6.49878 13.0917 5.68951C13.0917 4.60432 12.6606 3.56357 11.8933 2.79622C11.1259 2.02887 10.0852 1.59778 8.99997 1.59778ZM7.27426 3.9638C7.73195 3.50611 8.35271 3.24899 8.99997 3.24899C9.48266 3.24899 9.95452 3.39212 10.3559 3.66029C10.7572 3.92846 11.07 4.30962 11.2547 4.75556C11.4394 5.20151 11.4878 5.69222 11.3936 6.16563C11.2994 6.63905 11.067 7.07391 10.7257 7.41522C10.3844 7.75654 9.94951 7.98897 9.4761 8.08314C9.00268 8.17731 8.51197 8.12898 8.06603 7.94426C7.62008 7.75954 7.23892 7.44674 6.97075 7.04539C6.70258 6.64405 6.55945 6.1722 6.55945 5.68951C6.55945 5.04224 6.81658 4.42149 7.27426 3.9638ZM7.36691 10.3075C6.28172 10.3075 5.24097 10.7385 4.47362 11.5059C3.70627 12.2732 3.27518 13.314 3.27518 14.3992V17.121C3.27518 17.2763 3.4011 17.4022 3.55643 17.4022H4.64514C4.80047 17.4022 4.92639 17.2763 4.92639 17.121V14.3992C4.92639 13.7519 5.18351 13.1312 5.6412 12.6735C6.09889 12.2158 6.71964 11.9587 7.36691 11.9587H10.633C10.9535 11.9587 11.2709 12.0218 11.567 12.1444C11.8631 12.2671 12.1321 12.4469 12.3588 12.6735C12.5854 12.9001 12.7651 13.1691 12.8878 13.4652C13.0104 13.7613 13.0736 14.0787 13.0736 14.3992V17.121C13.0736 17.2763 13.1995 17.4022 13.3548 17.4022H14.4435C14.5989 17.4022 14.7248 17.2763 14.7248 17.121V14.3992C14.7248 13.314 14.2937 12.2732 13.5263 11.5059C12.759 10.7385 11.7182 10.3075 10.633 10.3075H7.36691Z"})),y.createElement("defs",null,y.createElement("clipPath",{id:"clip0"},y.createElement("rect",{width:18,height:18,transform:"translate(0 0.5)"}))));var Ee={},Ae,mt;function gs(){return mt||(mt=1,Ae=t=>encodeURIComponent(t).replace(/[!'()*]/g,m=>`%${m.charCodeAt(0).toString(16).toUpperCase()}`)),Ae}var De,pt;function xs(){if(pt)return De;pt=1;var t="%[a-f0-9]{2}",m=new RegExp("("+t+")|([^%]+?)","gi"),p=new RegExp("("+t+")+","gi");function v(a,i){try{return[decodeURIComponent(a.join(""))]}catch{}if(a.length===1)return a;i=i||1;var o=a.slice(0,i),h=a.slice(i);return Array.prototype.concat.call([],v(o),v(h))}function C(a){try{return decodeURIComponent(a)}catch{for(var i=a.match(m)||[],o=1;o<i.length;o++)a=v(i,o).join(""),i=a.match(m)||[];return a}}function x(a){for(var i={"%FE%FF":"��","%FF%FE":"��"},o=p.exec(a);o;){try{i[o[0]]=decodeURIComponent(o[0])}catch{var h=C(o[0]);h!==o[0]&&(i[o[0]]=h)}o=p.exec(a)}i["%C2"]="�";for(var n=Object.keys(i),S=0;S<n.length;S++){var P=n[S];a=a.replace(new RegExp(P,"g"),i[P])}return a}return De=function(a){if(typeof a!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof a+"`");try{return a=a.replace(/\+/g," "),decodeURIComponent(a)}catch{return x(a)}},De}var Re,ft;function ys(){return ft||(ft=1,Re=(t,m)=>{if(!(typeof t=="string"&&typeof m=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(m==="")return[t];const p=t.indexOf(m);return p===-1?[t]:[t.slice(0,p),t.slice(p+m.length)]}),Re}var Le,ht;function vs(){return ht||(ht=1,Le=function(t,m){for(var p={},v=Object.keys(t),C=Array.isArray(m),x=0;x<v.length;x++){var a=v[x],i=t[a];(C?m.indexOf(a)!==-1:m(a,i,t))&&(p[a]=i)}return p}),Le}var gt;function bs(){return gt||(gt=1,function(t){const m=gs(),p=xs(),v=ys(),C=vs(),x=r=>r==null;function a(r){switch(r.arrayFormat){case"index":return s=>(d,l)=>{const u=d.length;return l===void 0||r.skipNull&&l===null||r.skipEmptyString&&l===""?d:l===null?[...d,[h(s,r),"[",u,"]"].join("")]:[...d,[h(s,r),"[",h(u,r),"]=",h(l,r)].join("")]};case"bracket":return s=>(d,l)=>l===void 0||r.skipNull&&l===null||r.skipEmptyString&&l===""?d:l===null?[...d,[h(s,r),"[]"].join("")]:[...d,[h(s,r),"[]=",h(l,r)].join("")];case"comma":case"separator":return s=>(d,l)=>l==null||l.length===0?d:d.length===0?[[h(s,r),"=",h(l,r)].join("")]:[[d,h(l,r)].join(r.arrayFormatSeparator)];default:return s=>(d,l)=>l===void 0||r.skipNull&&l===null||r.skipEmptyString&&l===""?d:l===null?[...d,h(s,r)]:[...d,[h(s,r),"=",h(l,r)].join("")]}}function i(r){let s;switch(r.arrayFormat){case"index":return(d,l,u)=>{if(s=/\[(\d*)\]$/.exec(d),d=d.replace(/\[\d*\]$/,""),!s){u[d]=l;return}u[d]===void 0&&(u[d]={}),u[d][s[1]]=l};case"bracket":return(d,l,u)=>{if(s=/(\[\])$/.exec(d),d=d.replace(/\[\]$/,""),!s){u[d]=l;return}if(u[d]===void 0){u[d]=[l];return}u[d]=[].concat(u[d],l)};case"comma":case"separator":return(d,l,u)=>{const T=typeof l=="string"&&l.includes(r.arrayFormatSeparator),w=typeof l=="string"&&!T&&n(l,r).includes(r.arrayFormatSeparator);l=w?n(l,r):l;const R=T||w?l.split(r.arrayFormatSeparator).map(M=>n(M,r)):l===null?l:n(l,r);u[d]=R};default:return(d,l,u)=>{if(u[d]===void 0){u[d]=l;return}u[d]=[].concat(u[d],l)}}}function o(r){if(typeof r!="string"||r.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function h(r,s){return s.encode?s.strict?m(r):encodeURIComponent(r):r}function n(r,s){return s.decode?p(r):r}function S(r){return Array.isArray(r)?r.sort():typeof r=="object"?S(Object.keys(r)).sort((s,d)=>Number(s)-Number(d)).map(s=>r[s]):r}function P(r){const s=r.indexOf("#");return s!==-1&&(r=r.slice(0,s)),r}function g(r){let s="";const d=r.indexOf("#");return d!==-1&&(s=r.slice(d)),s}function k(r){r=P(r);const s=r.indexOf("?");return s===-1?"":r.slice(s+1)}function c(r,s){return s.parseNumbers&&!Number.isNaN(Number(r))&&typeof r=="string"&&r.trim()!==""?r=Number(r):s.parseBooleans&&r!==null&&(r.toLowerCase()==="true"||r.toLowerCase()==="false")&&(r=r.toLowerCase()==="true"),r}function f(r,s){s=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},s),o(s.arrayFormatSeparator);const d=i(s),l=Object.create(null);if(typeof r!="string"||(r=r.trim().replace(/^[?#&]/,""),!r))return l;for(const u of r.split("&")){if(u==="")continue;let[T,w]=v(s.decode?u.replace(/\+/g," "):u,"=");w=w===void 0?null:["comma","separator"].includes(s.arrayFormat)?w:n(w,s),d(n(T,s),w,l)}for(const u of Object.keys(l)){const T=l[u];if(typeof T=="object"&&T!==null)for(const w of Object.keys(T))T[w]=c(T[w],s);else l[u]=c(T,s)}return s.sort===!1?l:(s.sort===!0?Object.keys(l).sort():Object.keys(l).sort(s.sort)).reduce((u,T)=>{const w=l[T];return w&&typeof w=="object"&&!Array.isArray(w)?u[T]=S(w):u[T]=w,u},Object.create(null))}t.extract=k,t.parse=f,t.stringify=(r,s)=>{if(!r)return"";s=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},s),o(s.arrayFormatSeparator);const d=w=>s.skipNull&&x(r[w])||s.skipEmptyString&&r[w]==="",l=a(s),u={};for(const w of Object.keys(r))d(w)||(u[w]=r[w]);const T=Object.keys(u);return s.sort!==!1&&T.sort(s.sort),T.map(w=>{const R=r[w];return R===void 0?"":R===null?h(w,s):Array.isArray(R)?R.reduce(l(w),[]).join("&"):h(w,s)+"="+h(R,s)}).filter(w=>w.length>0).join("&")},t.parseUrl=(r,s)=>{s=Object.assign({decode:!0},s);const[d,l]=v(r,"#");return Object.assign({url:d.split("?")[0]||"",query:f(k(r),s)},s&&s.parseFragmentIdentifier&&l?{fragmentIdentifier:n(l,s)}:{})},t.stringifyUrl=(r,s)=>{s=Object.assign({encode:!0,strict:!0},s);const d=P(r.url).split("?")[0]||"",l=t.extract(r.url),u=t.parse(l,{sort:!1}),T=Object.assign(u,r.query);let w=t.stringify(T,s);w&&(w=`?${w}`);let R=g(r.url);return r.fragmentIdentifier&&(R=`#${h(r.fragmentIdentifier,s)}`),`${d}${w}${R}`},t.pick=(r,s,d)=>{d=Object.assign({parseFragmentIdentifier:!0},d);const{url:l,query:u,fragmentIdentifier:T}=t.parseUrl(r,d);return t.stringifyUrl({url:l,query:C(u,s),fragmentIdentifier:T},d)},t.exclude=(r,s,d)=>{const l=Array.isArray(s)?u=>!s.includes(u):(u,T)=>!s(u,T);return t.pick(r,l,d)}}(Ee)),Ee}var Oe=bs();const de=fr,Cs={parseNumbers:!1,parseBooleans:!1},js={skipNull:!1,skipEmptyString:!1},Ss=(t,m)=>{var p,v;const{navigateMode:C="push",parseOptions:x,stringifyOptions:a}={},i=Object.assign(Object.assign({},Cs),x),o=Object.assign(Object.assign({},js),a),h=de.useLocation(),n=(p=de.useHistory)===null||p===void 0?void 0:p.call(de),S=(v=de.useNavigate)===null||v===void 0?void 0:v.call(de),P=ss(),g=y.useRef(typeof t=="function"?t():t||{}),k=y.useMemo(()=>Oe.parse(h.search,i),[h.search]),c=y.useMemo(()=>Object.assign(Object.assign({},g.current),k),[k]);return[c,Ye(r=>{const s=typeof r=="function"?r(c):r;P(),n&&n[C]({hash:h.hash,search:Oe.stringify(Object.assign(Object.assign({},k),s),o)||"?"},h.state),S&&S({hash:h.hash,search:Oe.stringify(Object.assign(Object.assign({},k),s),o)||"?"},{replace:C==="replace",state:h.state})})]};var Ne,xt;function ws(){if(xt)return Ne;xt=1;const t=ls(),m=Qe(),{fromSecretKey:p,WalletType:v}=At(),{isHexStrict:C,toHex:x,toBuffer:a,stripHexPrefix:i}=$r(),{types:o}=m;return Ne={fromAppDid:(n,S,P={role:o.RoleType.ROLE_ACCOUNT},g=0)=>{if(!S)throw new Error("Cannot get user wallet with empty root sk");const k=m.Hasher.SHA3.hash256(a(n)),c=i(k).slice(0,16),f=c.slice(0,8),r=c.slice(8,16),s=parseInt(+`0x${f}`,10)&2147483647,d=parseInt(+`0x${r}`,10)&2147483647,l=i(C(S)?S:x(S)),u=t.fromMasterSeed(qe.from(l,"hex")),T=`m/44'/260'/${s}'/${d}'/${g}`,w=u.derive(T),R=v(P),{pk:M=o.KeyType.ED25519}=R;let F;return M===o.KeyType.ED25519?F=m.Signer.Ed25519.genKeyPair("hex",w.privateKey).secretKey:F=x(w.privateKey),M===o.KeyType.ETHEREUM&&(F=F.slice(0,66)),p(F,R)}},Ne}var Ue,yt;function ks(){if(yt)return Ue;yt=1;const t=Qe(),m=At(),p=zr(),v=ws(),C={role:t.types.RoleType.ROLE_APPLICATION};return Ue=(a,i,o,h)=>{let n=o||C;const S=(0,p.isEthereumType)((0,p.DidType)(o));if(S?n=(0,m.WalletType)(o):n=(0,m.WalletType)(C),!(0,p.isValid)(a)){let P="";try{return S?P=a.slice(0,66):P=a,(0,m.fromSecretKey)(P,n)}catch(g){throw new Error(`Cannot get blocklet wallet with invalid blocklet did or custom sk: ${g.message}`)}}if(!i)throw new Error("Cannot get blocklet wallet with empty node sk");return(0,v.fromAppDid)(a,i,n,h||0)},Ue}var ue,vt;function Ps(){if(vt)return ue;vt=1;var t=ue&&ue.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};const m=t(Hr),p=Qe(),v=t(ks()),C=Kr();return ue=(a,i,{returnWallet:o=!0}={})=>{if(!a||typeof a!="object"||!Array.isArray(a.environments)||!(0,m.default)(a,"meta.did"))throw new Error("Blocklet state must be an object");const{environments:h,configs:n=[]}=a,S=[...n,...h],P=S.find(N=>N.key==="BLOCKLET_APP_DESCRIPTION"),g=S.find(N=>N.key==="BLOCKLET_PASSPORT_COLOR"),k=S.find(N=>N.key==="BLOCKLET_APP_URL"),c=S.find(N=>N.key==="BLOCKLET_APP_TENANT_MODE"),{did:f,version:r}=a.meta,s=(0,C.getDisplayName)(a),d=(0,m.default)(P,"value",a.meta.description),l=(0,m.default)(g,"value","auto"),u=(0,m.default)(k,"value",""),T=(0,m.default)(c,"value","");if(!o)return{did:f,version:r,name:s,description:d,passportColor:l,appUrl:u,secret:"",wallet:null,permanentWallet:null,tenantMode:T};const w=S.find(N=>N.key==="BLOCKLET_APP_SK"),R=S.find(N=>N.key==="BLOCKLET_APP_CHAIN_TYPE")||S.find(N=>N.key==="BLOCKLET_WALLET_TYPE"),M=S.find(N=>N.key==="BLOCKLET_APP_PSK");let F;R&&(R.value==="ethereum"||R.value==="eth")&&(F=R.value);let W=null,E=null;if(w&&w.value)W=(0,v.default)(w.value,void 0,F),M&&M.value&&M.value!==w.value&&(E=(0,v.default)(M.value,void 0,F));else{if(!i||typeof i!="string")throw new Error("Node secret key must be a string");R?W=(0,v.default)(a.meta.did,i,F):W=(0,v.default)(a.meta.did,i)}const D=a.settings?.session?.salt||"",U=p.Hasher.SHA3.hash256(qe.concat([W.secretKey,W.address,D].filter(Boolean).map(N=>qe.from(N))));return{did:f,version:r,name:s,description:d,passportColor:l,appUrl:u,secret:U,wallet:W,permanentWallet:E||W,tenantMode:T}},ue}var Is=Ps();const Ts=hr(Is);var Es={};function zt({teamDid:t,roles:m=[],apps:p=[],onCancel:v,onSuccess:C,onError:x=()=>{},endpoint:a=""}){const{api:i}=K(),{t:o,locale:h}=Z(),n=ke({loading:!1,error:null,activeStep:0,inviteInfo:null,role:"",remark:"",sourceAppPid:p.length>0?p[0].appPid:null,display:null,passportExpireTime:null,showPicker:!1}),S=async()=>{if(!n.role){n.error=o("team.member.error.passportEmpty");return}if(n.passportExpireTime&&He(n.passportExpireTime).isBefore(He())){n.error=o("team.passport.customExpireTimeIsInvalid");return}const f=n.remark.trim();n.error=null,n.loading=!0;try{let r=n.sourceAppPid??null;r===t&&(r=null);const s={teamDid:t,role:n.role,remark:f,sourceAppPid:r,passportExpireTime:n.passportExpireTime?n.passportExpireTime.toISOString():""};n.display&&(s.display={type:"url",content:n.display});const{inviteInfo:d}=await i.createMemberInvitation({input:s});n.inviteInfo=d,n.activeStep=1}catch(r){const s=ee(r);n.error=s,x(r)}finally{n.loading=!1}},P=m.find(f=>f.name===n.role),g=m.filter(f=>f.name!=="owner"),c=[{body:e.jsxs(O,{sx:{display:"flex",flexDirection:"column",gap:3},children:[p.length>1?e.jsxs(Me,{fullWidth:!0,children:[e.jsx(_e,{children:o("common.sourceApp")}),e.jsx(We,{value:n.sourceAppPid,onChange:f=>{n.error=null,n.sourceAppPid=f.target.value},fullWidth:!0,label:o("common.passport"),disabled:n.loading,children:p.map(f=>e.jsx(Ce,{value:f.appPid,children:e.jsxs(O,{sx:{display:"flex",justifyContent:"space-between",gap:2,width:"100%"},children:[e.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(Br,{did:f.appPid,size:28}),f.appName]}),e.jsx(Mr,{did:f.appPid,compact:!0,responsive:!1})]})},f.appPid))})]}):null,e.jsxs(Me,{fullWidth:!0,variant:"outlined",children:[e.jsx(_e,{children:o("common.passport")}),e.jsx(We,{"data-cy":"invite-member-select-role",value:n.role,onChange:f=>{n.error=null,n.role=f.target.value},fullWidth:!0,label:o("common.passport"),disabled:n.loading,onKeyPress:f=>{f.key==="Enter"&&(f.preventDefault(),S())},children:g.map(f=>e.jsx(Ce,{value:f.name,"data-cy":`invite-member-select-option-${f.name}`,children:e.jsxs(O,{sx:{display:"flex",flexDirection:"column"},children:[e.jsx(X,{variant:"subtitle1",children:f.title||f.name}),e.jsx(X,{variant:"caption",sx:{opacity:.7},children:f.description})]})},f.name))})]}),P?.extra?.display==="custom"&&e.jsx(pe,{label:o("common.display"),type:"url",value:n.display,onChange:f=>{n.error=null,n.display=f.target.value},fullWidth:!0,variant:"outlined",margin:"normal"}),e.jsx(pe,{label:o("common.remark"),autoComplete:"off",variant:"outlined",fullWidth:!0,value:n.remark,onChange:f=>{n.error=null,n.remark=f.target.value},disabled:n.loading,"data-cy":"invite-member-input-remark"}),e.jsx(Bt,{value:n.passportExpireTime,onChange:f=>{n.error=null,n.passportExpireTime=f},showError:!1})]}),cancel:o("common.cancel"),confirm:o("team.member.inviteDialog.createInviteLink"),onCancel:v,onConfirm:S},{body:()=>{const f=Se({inviteId:n.inviteInfo?.inviteId,endpoint:a});return e.jsxs("div",{children:[e.jsx(O,{sx:{fontSize:16,fontWeight:"bold"},children:o("team.member.inviteDialog.createSuccessTip",{expireDate:he(n.inviteInfo?.expireDate,h)})}),e.jsx("div",{style:{marginTop:"40px"}}),e.jsx(Pe,{children:f})]})},confirm:o("common.copy"),onConfirm:()=>{const f=Se({inviteId:n.inviteInfo?.inviteId,endpoint:a});if(["1","true"].includes(Es.IS_E2E)){C();return}ns(f),Y.success(o("common.copied")),C()},cancel:o("common.cancel"),onCancel:v}][n.activeStep];return e.jsxs(re,{title:o("common.invite"),fullWidth:!0,open:!0,showCloseButton:!1,actions:e.jsxs(e.Fragment,{children:[c.cancel&&e.jsx($,{onClick:c.onCancel,color:"inherit",children:c.cancel}),e.jsxs($,{onClick:c.onConfirm,color:"primary",disabled:n.loading||!n.role,variant:"contained",autoFocus:!0,children:[n.loading&&e.jsx(ae,{size:16}),c.confirm]})]}),children:[e.jsx(Ze,{component:"div",children:typeof c.body=="function"?c.body():c.body}),!!n.error&&e.jsx(ie,{severity:"error",sx:{mt:2},children:n.error})]})}zt.propTypes={teamDid:b.string.isRequired,onCancel:b.func.isRequired,onSuccess:b.func.isRequired,onError:b.func,roles:b.array,apps:b.array,endpoint:b.string};function Ht({teamDid:t,onCancel:m,onSuccess:p,onError:v=()=>{},endpoint:C=""}){const{api:x,info:a}=K(),{api:i}=y.useContext(Vr),[o,h]=y.useState(!1),{t:n,locale:S}=Z(),[P,g]=y.useState(""),[k,c]=y.useState(!1),[f,r]=y.useState(0),[s,d]=y.useState(""),[l,u]=y.useState(""),T=!!$e(a,"ownerNft.did"),w=cs(async()=>{if(T){const{state:D}=await x.getDelegationState();return D}return{delegated:!0}});if(w.loading)return e.jsx(re,{title:n("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,onClose:m,children:e.jsx("div",{style:{display:"flex",justifyContent:"center"},children:e.jsx(ae,{})})});if(w.error)return e.jsx(re,{title:n("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,onClose:m,children:e.jsx(ie,{severity:"error",children:ee(w.error)})});const R=async()=>{g(null),h(!0);try{const{inviteInfo:D}=await x.createTransferInvitation({input:{teamDid:t,role:"owner",remark:l.trim()}});d(D),r(W.length-1)}catch(D){const U=ee(D);g(U),v(D)}finally{h(!1)}},M=()=>{c(!0),r(1)},F=()=>{c(!1),r(0)},W=[{body:e.jsxs(X,{component:"div",children:[e.jsxs(ie,{severity:"warning",children:[e.jsx(X,{children:n("team.transferNode.inviteDialog.tips.progress")}),e.jsx(X,{children:n("team.transferNode.inviteDialog.tips.newOwnerPermissions")})]}),e.jsx(ie,{severity:"warning",children:e.jsx(X,{children:n("team.transferNode.inviteDialog.tips.revoke")})}),e.jsx("div",{style:{marginTop:20,marginBottom:10}}),e.jsx(pe,{label:n("common.remark"),autoComplete:"off",variant:"outlined",fullWidth:!0,style:{marginBottom:8},value:l,onChange:D=>{g(null),u(D.target.value)},disabled:o,"data-cy":"transfer-node-input-remark"}),e.jsx("div",{style:{marginTop:20,marginBottom:10}})]}),cancel:n("common.cancel"),confirm:n("team.transferNode.inviteDialog.createInviteLink"),onCancel:m,onConfirm:T&&!$e(w,"value.delegated")?M:R},{body:()=>e.jsx(Zr,{action:"delegate-transfer-nft",open:k,locale:S,checkFn:i.get,onClose:F,onSuccess:R,checkTimeout:5*60*1e3,webWalletUrl:Qr(a),extraParams:{targetDID:a.did},messages:{title:n("team.transferNode.delegateDialog.title"),scan:n("team.transferNode.delegateDialog.scan"),confirm:n("team.transferNode.delegateDialog.confirm"),success:n("team.transferNode.delegateDialog.success")},popup:!0})},{body:()=>{const D=Se({inviteId:s.inviteId,endpoint:C});return e.jsxs("div",{children:[e.jsx(As,{children:n("team.transferNode.inviteDialog.createSuccessTip",{expireDate:he(s.expireDate,S)})}),e.jsx("div",{style:{marginTop:"40px"}}),e.jsx(Pe,{children:D})]})},confirm:n("common.confirm"),onConfirm:p}],E=W[f];return e.jsxs(re,{title:n("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,showCloseButton:!1,actions:e.jsxs(e.Fragment,{children:[E.cancel&&e.jsx($,{onClick:E.onCancel,color:"inherit",children:E.cancel}),e.jsxs($,{onClick:E.onConfirm,color:"primary",disabled:o,variant:"contained",autoFocus:!0,children:[o&&e.jsx(ae,{size:16}),E.confirm]})]}),children:[e.jsx(Ze,{component:"div",children:typeof E.body=="function"?E.body():E.body}),!!P&&e.jsx(ie,{severity:"error",children:P})]})}Ht.propTypes={teamDid:b.string.isRequired,onCancel:b.func.isRequired,onSuccess:b.func.isRequired,onError:b.func,endpoint:b.string};const As=z.div`
|
|
1
|
+
import{r as y,t as fr,g as hr,e as gr}from"./vendor-react-Dvs43sk9.js";import{j as e,ak as O,y as Me,x as _e,bb as We,M as Ce,T as X,z as pe,bC as Ze,aX as ie,a6 as ae,W as b,at as z,aj as xr,aI as yr,D as vr,cf as je,bp as br,b6 as Pt,bq as Cr,am as fe,bZ as dt,P as jr,Q as It,bW as Sr,ds as wr,ch as kr,aO as Pr,aP as Ir,dt as Tr,I as Er,dn as Ar,bL as Dr,du as Rr,a5 as Lr}from"./vendor-mui-core-CmD-NPnl.js";import{B as qe,e as $e,K as Or,ad as Nr,n as ut,C as Ur,a as Fr}from"./vendor-utils-DQK0pEML.js";import{T as Z,$ as Br,J as Mr,H as Y,F as re,D as $,G as ge,O as Tt,ab as _r,L as Wr,a6 as ze,ac as Et,ai as qr}from"./vendor-ux-pYOhjQLA.js";import{bd as Qe,aA as At,av as $r,aB as zr,bS as Hr,bT as Kr,Z as K,bU as Se,p as he,ap as He,W as Vr,v as Zr,aM as Qr,B as ne,bV as Yr,bW as Gr,a8 as Dt,c as te,b9 as Xr,a5 as Jr,X as se,bX as Rt,ar as es,aZ as Lt,bY as ts}from"./index-D5Esor4q.js";import{B as Ot,o as rs,l as Nt}from"./index-DDpL_qpY.js";import{x as ss,b as Ye,g as ke,c as ns,h as os,a as is}from"./vendor-hooks-DLNZ8kxG.js";import{C as Ut,P as as}from"./user-sessions-DN1hzt8P.js";import{r as ls}from"./hdkey-CcHIRiJU.js";import{W as Ft}from"./dashboard-q_CEWNOG.js";import{W as Ge}from"./did-address-CNnw4_bl.js";import{u as Q}from"./team-CGGZIbfh.js";import{u as le}from"./session-DGB-yOme.js";import{P as J}from"./permission-DO4jN8xJ.js";import{C as Pe}from"./click-to-copy-Dqmzk5Lh.js";import{T as Bt}from"./index-DL5x17V7.js";import{f as ee}from"./index-DBs9Ljax.js";import{u as cs}from"./useAsync-DZevTxbv.js";import{v as H}from"./index-DzI9kX_C.js";import{C as xe}from"./confirm-DUjUXcfn.js";import{N as ds}from"./index-BVZj6aBL.js";import{i as Mt,a as we,p as _t}from"./util-CYsTlK2W.js";import{b as us}from"./sdk-C9i2DDEJ.js";import{U as ms}from"./user-follower-Cs8st3w5.js";import{A as ps}from"./actions-CL4xTGOh.js";import{S as fs}from"./shorten-label-Cbu8wo9m.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-DEa0A9MF.js";import"./useLocalStorage-CiLfInVV.js";import"./get-safe-url-PVZ8sNva.js";import"./useAsyncRetry-6TjWJyO6.js";import"./useAsync-CNAYLnLm.js";import"./useSetState-DFuQZPPV.js";import"./index-DhLCZYhn.js";import"./over-due-invoice-payment-CgKEpOv9.js";import"./use-mobile-CQ7Tw4aD.js";import"./isURL-DZGsNcmL.js";import"./use-app-logo-DxlfjGOQ.js";import"./arrow-down.svg-DNHk5QBL.js";import"./vendor-mui-x--K2rEM1j.js";import"./AdapterDayjs-Ch1GqpK7.js";import"./base32-9HlsUoU3.js";import"./use-mobile-D93Bk2Ru.js";const Wt=t=>y.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",...t},y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.88619 1.875C5.0541 1.875 4.24071 2.12174 3.54885 2.58402C2.857 3.0463 2.31777 3.70336 1.99934 4.47211C1.68092 5.24085 1.5976 6.08676 1.75994 6.90285C1.92227 7.71895 2.32295 8.46858 2.91133 9.05695C3.4997 9.64532 4.24933 10.046 5.06543 10.2083C5.88152 10.3707 6.72743 10.2874 7.49617 9.96893C8.26492 9.65051 8.92198 9.11128 9.38426 8.41942C9.84654 7.72757 10.0933 6.91417 10.0933 6.08209C10.0933 4.9663 9.65003 3.89621 8.86105 3.10723C8.07207 2.31825 7.00198 1.875 5.88619 1.875ZM4.11182 4.30773C4.58242 3.83714 5.22067 3.57276 5.88619 3.57276C6.38249 3.57276 6.86764 3.71993 7.2803 3.99566C7.69295 4.27139 8.01458 4.66329 8.20451 5.12181C8.39443 5.58033 8.44413 6.08487 8.3473 6.57164C8.25048 7.0584 8.01149 7.50552 7.66055 7.85645C7.30962 8.20739 6.8625 8.44638 6.37574 8.5432C5.88897 8.64003 5.38443 8.59033 4.92591 8.40041C4.46739 8.21048 4.07549 7.88885 3.79976 7.4762C3.52403 7.06354 3.37686 6.57839 3.37686 6.08209C3.37686 5.41657 3.64123 4.77832 4.11182 4.30773ZM4.20709 10.8302C3.0913 10.8302 2.02121 11.2735 1.23223 12.0624C0.443246 12.8514 0 13.9215 0 15.0373V17.8358C0 17.9955 0.12947 18.125 0.289179 18.125H1.40858C1.56829 18.125 1.69776 17.9955 1.69776 17.8358V15.0373C1.69776 14.3718 1.96214 13.7335 2.43273 13.2629C2.90332 12.7924 3.54157 12.528 4.20709 12.528H7.5653C7.89483 12.528 8.22113 12.5929 8.52558 12.719C8.83002 12.8451 9.10665 13.0299 9.33966 13.2629C9.57267 13.496 9.75751 13.7726 9.88361 14.077C10.0097 14.3815 10.0746 14.7078 10.0746 15.0373V17.8358C10.0746 17.9955 10.2041 18.125 10.3638 18.125H11.4832C11.6429 18.125 11.7724 17.9955 11.7724 17.8358V15.0373C11.7724 13.9215 11.3291 12.8514 10.5402 12.0624C9.75118 11.2735 8.68109 10.8302 7.5653 10.8302H4.20709Z"}),y.createElement("rect",{x:12.5,y:9.375,width:7.5,height:1.875,rx:.9375}),y.createElement("rect",{x:15.3125,y:14.0625,width:7.5,height:1.875,rx:.9375,transform:"rotate(-90 15.3125 14.0625)"})),qt=t=>y.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",...t},y.createElement("path",{d:"M1.25 2.7087C1.25 2.24826 1.62326 1.875 2.0837 1.875H14.339C14.7995 1.875 15.1727 2.24826 15.1727 2.7087V9.31574C15.1727 9.77618 14.7995 10.1494 14.339 10.1494C13.8786 10.1494 13.5053 9.77618 13.5053 9.31574V3.54239H2.91739V16.7565H6.53772H8.34788H9.32435C9.78479 16.7565 10.158 17.1297 10.158 17.5902C10.158 18.0506 9.78479 18.4239 9.32435 18.4239H8.34788H2.0837C1.62326 18.4239 1.25 18.0506 1.25 17.5902V2.7087Z"}),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.21129 7.91935C7.70481 7.91935 7.29422 8.32993 7.29422 8.83641C7.29422 9.34289 7.70481 9.75348 8.21129 9.75348C8.71777 9.75348 9.12836 9.34289 9.12836 8.83641C9.12836 8.32993 8.71777 7.91935 8.21129 7.91935ZM5.62683 8.83641C5.62683 7.40905 6.78393 6.25195 8.21129 6.25195C9.63865 6.25195 10.7957 7.40905 10.7957 8.83641C10.7957 10.2638 9.63865 11.4209 8.21129 11.4209C6.78393 11.4209 5.62683 10.2638 5.62683 8.83641Z"}),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.62683 13.2133C5.62683 12.7529 6.00009 12.3796 6.46053 12.3796H9.96205C10.4225 12.3796 10.7957 12.7529 10.7957 13.2133C10.7957 13.6737 10.4225 14.047 9.96205 14.047H6.46053C6.00009 14.047 5.62683 13.6737 5.62683 13.2133Z"}),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.6406 11.3125C15.8547 11.3125 16.0503 11.434 16.145 11.626L17.1779 13.7184L19.4876 14.056C19.6994 14.087 19.8753 14.2355 19.9413 14.4391C20.0074 14.6427 19.9521 14.8662 19.7987 15.0156L18.1279 16.643L18.5222 18.9421C18.5584 19.1532 18.4716 19.3665 18.2984 19.4923C18.1252 19.6182 17.8955 19.6347 17.706 19.5351L15.6406 18.4489L13.5753 19.5351C13.3858 19.6347 13.1561 19.6182 12.9829 19.4923C12.8096 19.3665 12.7229 19.1532 12.7591 18.9421L13.1534 16.643L11.4825 15.0156C11.3292 14.8662 11.2739 14.6427 11.3399 14.4391C11.406 14.2355 11.5818 14.087 11.7937 14.056L14.1034 13.7184L15.1362 11.626C15.231 11.434 15.4265 11.3125 15.6406 11.3125ZM15.6406 13.1458L14.9815 14.4813C14.8996 14.6471 14.7414 14.7621 14.5584 14.7889L13.0835 15.0044L14.1503 16.0435C14.283 16.1727 14.3435 16.359 14.3122 16.5416L14.0606 18.0088L15.3788 17.3155C15.5427 17.2293 15.7386 17.2293 15.9025 17.3155L17.2207 18.0088L16.969 16.5416C16.9377 16.359 16.9983 16.1727 17.131 16.0435L18.1978 15.0044L16.7229 14.7889C16.5399 14.7621 16.3817 14.6471 16.2998 14.4813L15.6406 13.1458Z"})),$t=t=>y.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",...t},y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.88619 1.875C5.0541 1.875 4.24071 2.12174 3.54885 2.58402C2.857 3.0463 2.31777 3.70336 1.99934 4.47211C1.68092 5.24085 1.5976 6.08676 1.75994 6.90285C1.92227 7.71895 2.32295 8.46858 2.91133 9.05695C3.4997 9.64532 4.24933 10.046 5.06543 10.2083C5.88152 10.3707 6.72743 10.2874 7.49617 9.96893C8.26492 9.65051 8.92198 9.11128 9.38426 8.41942C9.84654 7.72757 10.0933 6.91417 10.0933 6.08209C10.0933 4.9663 9.65003 3.89621 8.86105 3.10723C8.07207 2.31825 7.00198 1.875 5.88619 1.875ZM4.11182 4.30773C4.58242 3.83714 5.22067 3.57276 5.88619 3.57276C6.38249 3.57276 6.86764 3.71993 7.2803 3.99566C7.69295 4.27139 8.01458 4.66329 8.20451 5.12181C8.39443 5.58033 8.44413 6.08487 8.3473 6.57164C8.25048 7.0584 8.01149 7.50552 7.66055 7.85645C7.30962 8.20739 6.8625 8.44638 6.37574 8.5432C5.88897 8.64003 5.38443 8.59033 4.92591 8.40041C4.46739 8.21048 4.07549 7.88885 3.79976 7.4762C3.52403 7.06354 3.37686 6.57839 3.37686 6.08209C3.37686 5.41657 3.64123 4.77832 4.11182 4.30773ZM4.20709 10.8302C3.0913 10.8302 2.02121 11.2735 1.23223 12.0624C0.443246 12.8514 0 13.9215 0 15.0373V17.8358C0 17.9955 0.12947 18.125 0.289179 18.125H1.40858C1.56829 18.125 1.69776 17.9955 1.69776 17.8358V15.0373C1.69776 14.3718 1.96214 13.7335 2.43273 13.2629C2.90332 12.7924 3.54157 12.528 4.20709 12.528H7.5653C7.89483 12.528 8.22113 12.5929 8.52558 12.719C8.83002 12.8451 9.10665 13.0299 9.33966 13.2629C9.57267 13.496 9.75751 13.7726 9.88361 14.077C10.0097 14.3815 10.0746 14.7078 10.0746 15.0373V17.8358C10.0746 17.9955 10.2041 18.125 10.3638 18.125H11.4832C11.6429 18.125 11.7724 17.9955 11.7724 17.8358V15.0373C11.7724 13.9215 11.3291 12.8514 10.5402 12.0624C9.75118 11.2735 8.68109 10.8302 7.5653 10.8302H4.20709Z"}),y.createElement("rect",{x:12.5,y:9.375,width:7.5,height:1.875,rx:.9375})),hs=t=>y.createElement("svg",{width:18,height:19,viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg",...t},y.createElement("g",{clipPath:"url(#clip0)"},y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.99997 1.59778C8.19071 1.59778 7.39961 1.83775 6.72673 2.28736C6.05385 2.73697 5.5294 3.37601 5.21971 4.12367C4.91001 4.87134 4.82898 5.69405 4.98686 6.48777C5.14474 7.28149 5.53444 8.01056 6.10668 8.5828C6.67892 9.15504 7.408 9.54474 8.20172 9.70262C8.99544 9.8605 9.81815 9.77947 10.5658 9.46978C11.3135 9.16009 11.9525 8.63564 12.4021 7.96276C12.8517 7.28987 13.0917 6.49878 13.0917 5.68951C13.0917 4.60432 12.6606 3.56357 11.8933 2.79622C11.1259 2.02887 10.0852 1.59778 8.99997 1.59778ZM7.27426 3.9638C7.73195 3.50611 8.35271 3.24899 8.99997 3.24899C9.48266 3.24899 9.95452 3.39212 10.3559 3.66029C10.7572 3.92846 11.07 4.30962 11.2547 4.75556C11.4394 5.20151 11.4878 5.69222 11.3936 6.16563C11.2994 6.63905 11.067 7.07391 10.7257 7.41522C10.3844 7.75654 9.94951 7.98897 9.4761 8.08314C9.00268 8.17731 8.51197 8.12898 8.06603 7.94426C7.62008 7.75954 7.23892 7.44674 6.97075 7.04539C6.70258 6.64405 6.55945 6.1722 6.55945 5.68951C6.55945 5.04224 6.81658 4.42149 7.27426 3.9638ZM7.36691 10.3075C6.28172 10.3075 5.24097 10.7385 4.47362 11.5059C3.70627 12.2732 3.27518 13.314 3.27518 14.3992V17.121C3.27518 17.2763 3.4011 17.4022 3.55643 17.4022H4.64514C4.80047 17.4022 4.92639 17.2763 4.92639 17.121V14.3992C4.92639 13.7519 5.18351 13.1312 5.6412 12.6735C6.09889 12.2158 6.71964 11.9587 7.36691 11.9587H10.633C10.9535 11.9587 11.2709 12.0218 11.567 12.1444C11.8631 12.2671 12.1321 12.4469 12.3588 12.6735C12.5854 12.9001 12.7651 13.1691 12.8878 13.4652C13.0104 13.7613 13.0736 14.0787 13.0736 14.3992V17.121C13.0736 17.2763 13.1995 17.4022 13.3548 17.4022H14.4435C14.5989 17.4022 14.7248 17.2763 14.7248 17.121V14.3992C14.7248 13.314 14.2937 12.2732 13.5263 11.5059C12.759 10.7385 11.7182 10.3075 10.633 10.3075H7.36691Z"})),y.createElement("defs",null,y.createElement("clipPath",{id:"clip0"},y.createElement("rect",{width:18,height:18,transform:"translate(0 0.5)"}))));var Ee={},Ae,mt;function gs(){return mt||(mt=1,Ae=t=>encodeURIComponent(t).replace(/[!'()*]/g,m=>`%${m.charCodeAt(0).toString(16).toUpperCase()}`)),Ae}var De,pt;function xs(){if(pt)return De;pt=1;var t="%[a-f0-9]{2}",m=new RegExp("("+t+")|([^%]+?)","gi"),p=new RegExp("("+t+")+","gi");function v(a,i){try{return[decodeURIComponent(a.join(""))]}catch{}if(a.length===1)return a;i=i||1;var o=a.slice(0,i),h=a.slice(i);return Array.prototype.concat.call([],v(o),v(h))}function C(a){try{return decodeURIComponent(a)}catch{for(var i=a.match(m)||[],o=1;o<i.length;o++)a=v(i,o).join(""),i=a.match(m)||[];return a}}function x(a){for(var i={"%FE%FF":"��","%FF%FE":"��"},o=p.exec(a);o;){try{i[o[0]]=decodeURIComponent(o[0])}catch{var h=C(o[0]);h!==o[0]&&(i[o[0]]=h)}o=p.exec(a)}i["%C2"]="�";for(var n=Object.keys(i),S=0;S<n.length;S++){var P=n[S];a=a.replace(new RegExp(P,"g"),i[P])}return a}return De=function(a){if(typeof a!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof a+"`");try{return a=a.replace(/\+/g," "),decodeURIComponent(a)}catch{return x(a)}},De}var Re,ft;function ys(){return ft||(ft=1,Re=(t,m)=>{if(!(typeof t=="string"&&typeof m=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(m==="")return[t];const p=t.indexOf(m);return p===-1?[t]:[t.slice(0,p),t.slice(p+m.length)]}),Re}var Le,ht;function vs(){return ht||(ht=1,Le=function(t,m){for(var p={},v=Object.keys(t),C=Array.isArray(m),x=0;x<v.length;x++){var a=v[x],i=t[a];(C?m.indexOf(a)!==-1:m(a,i,t))&&(p[a]=i)}return p}),Le}var gt;function bs(){return gt||(gt=1,function(t){const m=gs(),p=xs(),v=ys(),C=vs(),x=r=>r==null;function a(r){switch(r.arrayFormat){case"index":return s=>(d,l)=>{const u=d.length;return l===void 0||r.skipNull&&l===null||r.skipEmptyString&&l===""?d:l===null?[...d,[h(s,r),"[",u,"]"].join("")]:[...d,[h(s,r),"[",h(u,r),"]=",h(l,r)].join("")]};case"bracket":return s=>(d,l)=>l===void 0||r.skipNull&&l===null||r.skipEmptyString&&l===""?d:l===null?[...d,[h(s,r),"[]"].join("")]:[...d,[h(s,r),"[]=",h(l,r)].join("")];case"comma":case"separator":return s=>(d,l)=>l==null||l.length===0?d:d.length===0?[[h(s,r),"=",h(l,r)].join("")]:[[d,h(l,r)].join(r.arrayFormatSeparator)];default:return s=>(d,l)=>l===void 0||r.skipNull&&l===null||r.skipEmptyString&&l===""?d:l===null?[...d,h(s,r)]:[...d,[h(s,r),"=",h(l,r)].join("")]}}function i(r){let s;switch(r.arrayFormat){case"index":return(d,l,u)=>{if(s=/\[(\d*)\]$/.exec(d),d=d.replace(/\[\d*\]$/,""),!s){u[d]=l;return}u[d]===void 0&&(u[d]={}),u[d][s[1]]=l};case"bracket":return(d,l,u)=>{if(s=/(\[\])$/.exec(d),d=d.replace(/\[\]$/,""),!s){u[d]=l;return}if(u[d]===void 0){u[d]=[l];return}u[d]=[].concat(u[d],l)};case"comma":case"separator":return(d,l,u)=>{const T=typeof l=="string"&&l.includes(r.arrayFormatSeparator),w=typeof l=="string"&&!T&&n(l,r).includes(r.arrayFormatSeparator);l=w?n(l,r):l;const R=T||w?l.split(r.arrayFormatSeparator).map(M=>n(M,r)):l===null?l:n(l,r);u[d]=R};default:return(d,l,u)=>{if(u[d]===void 0){u[d]=l;return}u[d]=[].concat(u[d],l)}}}function o(r){if(typeof r!="string"||r.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function h(r,s){return s.encode?s.strict?m(r):encodeURIComponent(r):r}function n(r,s){return s.decode?p(r):r}function S(r){return Array.isArray(r)?r.sort():typeof r=="object"?S(Object.keys(r)).sort((s,d)=>Number(s)-Number(d)).map(s=>r[s]):r}function P(r){const s=r.indexOf("#");return s!==-1&&(r=r.slice(0,s)),r}function g(r){let s="";const d=r.indexOf("#");return d!==-1&&(s=r.slice(d)),s}function k(r){r=P(r);const s=r.indexOf("?");return s===-1?"":r.slice(s+1)}function c(r,s){return s.parseNumbers&&!Number.isNaN(Number(r))&&typeof r=="string"&&r.trim()!==""?r=Number(r):s.parseBooleans&&r!==null&&(r.toLowerCase()==="true"||r.toLowerCase()==="false")&&(r=r.toLowerCase()==="true"),r}function f(r,s){s=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},s),o(s.arrayFormatSeparator);const d=i(s),l=Object.create(null);if(typeof r!="string"||(r=r.trim().replace(/^[?#&]/,""),!r))return l;for(const u of r.split("&")){if(u==="")continue;let[T,w]=v(s.decode?u.replace(/\+/g," "):u,"=");w=w===void 0?null:["comma","separator"].includes(s.arrayFormat)?w:n(w,s),d(n(T,s),w,l)}for(const u of Object.keys(l)){const T=l[u];if(typeof T=="object"&&T!==null)for(const w of Object.keys(T))T[w]=c(T[w],s);else l[u]=c(T,s)}return s.sort===!1?l:(s.sort===!0?Object.keys(l).sort():Object.keys(l).sort(s.sort)).reduce((u,T)=>{const w=l[T];return w&&typeof w=="object"&&!Array.isArray(w)?u[T]=S(w):u[T]=w,u},Object.create(null))}t.extract=k,t.parse=f,t.stringify=(r,s)=>{if(!r)return"";s=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},s),o(s.arrayFormatSeparator);const d=w=>s.skipNull&&x(r[w])||s.skipEmptyString&&r[w]==="",l=a(s),u={};for(const w of Object.keys(r))d(w)||(u[w]=r[w]);const T=Object.keys(u);return s.sort!==!1&&T.sort(s.sort),T.map(w=>{const R=r[w];return R===void 0?"":R===null?h(w,s):Array.isArray(R)?R.reduce(l(w),[]).join("&"):h(w,s)+"="+h(R,s)}).filter(w=>w.length>0).join("&")},t.parseUrl=(r,s)=>{s=Object.assign({decode:!0},s);const[d,l]=v(r,"#");return Object.assign({url:d.split("?")[0]||"",query:f(k(r),s)},s&&s.parseFragmentIdentifier&&l?{fragmentIdentifier:n(l,s)}:{})},t.stringifyUrl=(r,s)=>{s=Object.assign({encode:!0,strict:!0},s);const d=P(r.url).split("?")[0]||"",l=t.extract(r.url),u=t.parse(l,{sort:!1}),T=Object.assign(u,r.query);let w=t.stringify(T,s);w&&(w=`?${w}`);let R=g(r.url);return r.fragmentIdentifier&&(R=`#${h(r.fragmentIdentifier,s)}`),`${d}${w}${R}`},t.pick=(r,s,d)=>{d=Object.assign({parseFragmentIdentifier:!0},d);const{url:l,query:u,fragmentIdentifier:T}=t.parseUrl(r,d);return t.stringifyUrl({url:l,query:C(u,s),fragmentIdentifier:T},d)},t.exclude=(r,s,d)=>{const l=Array.isArray(s)?u=>!s.includes(u):(u,T)=>!s(u,T);return t.pick(r,l,d)}}(Ee)),Ee}var Oe=bs();const de=fr,Cs={parseNumbers:!1,parseBooleans:!1},js={skipNull:!1,skipEmptyString:!1},Ss=(t,m)=>{var p,v;const{navigateMode:C="push",parseOptions:x,stringifyOptions:a}={},i=Object.assign(Object.assign({},Cs),x),o=Object.assign(Object.assign({},js),a),h=de.useLocation(),n=(p=de.useHistory)===null||p===void 0?void 0:p.call(de),S=(v=de.useNavigate)===null||v===void 0?void 0:v.call(de),P=ss(),g=y.useRef(typeof t=="function"?t():t||{}),k=y.useMemo(()=>Oe.parse(h.search,i),[h.search]),c=y.useMemo(()=>Object.assign(Object.assign({},g.current),k),[k]);return[c,Ye(r=>{const s=typeof r=="function"?r(c):r;P(),n&&n[C]({hash:h.hash,search:Oe.stringify(Object.assign(Object.assign({},k),s),o)||"?"},h.state),S&&S({hash:h.hash,search:Oe.stringify(Object.assign(Object.assign({},k),s),o)||"?"},{replace:C==="replace",state:h.state})})]};var Ne,xt;function ws(){if(xt)return Ne;xt=1;const t=ls(),m=Qe(),{fromSecretKey:p,WalletType:v}=At(),{isHexStrict:C,toHex:x,toBuffer:a,stripHexPrefix:i}=$r(),{types:o}=m;return Ne={fromAppDid:(n,S,P={role:o.RoleType.ROLE_ACCOUNT},g=0)=>{if(!S)throw new Error("Cannot get user wallet with empty root sk");const k=m.Hasher.SHA3.hash256(a(n)),c=i(k).slice(0,16),f=c.slice(0,8),r=c.slice(8,16),s=parseInt(+`0x${f}`,10)&2147483647,d=parseInt(+`0x${r}`,10)&2147483647,l=i(C(S)?S:x(S)),u=t.fromMasterSeed(qe.from(l,"hex")),T=`m/44'/260'/${s}'/${d}'/${g}`,w=u.derive(T),R=v(P),{pk:M=o.KeyType.ED25519}=R;let F;return M===o.KeyType.ED25519?F=m.Signer.Ed25519.genKeyPair("hex",w.privateKey).secretKey:F=x(w.privateKey),M===o.KeyType.ETHEREUM&&(F=F.slice(0,66)),p(F,R)}},Ne}var Ue,yt;function ks(){if(yt)return Ue;yt=1;const t=Qe(),m=At(),p=zr(),v=ws(),C={role:t.types.RoleType.ROLE_APPLICATION};return Ue=(a,i,o,h)=>{let n=o||C;const S=(0,p.isEthereumType)((0,p.DidType)(o));if(S?n=(0,m.WalletType)(o):n=(0,m.WalletType)(C),!(0,p.isValid)(a)){let P="";try{return S?P=a.slice(0,66):P=a,(0,m.fromSecretKey)(P,n)}catch(g){throw new Error(`Cannot get blocklet wallet with invalid blocklet did or custom sk: ${g.message}`)}}if(!i)throw new Error("Cannot get blocklet wallet with empty node sk");return(0,v.fromAppDid)(a,i,n,h||0)},Ue}var ue,vt;function Ps(){if(vt)return ue;vt=1;var t=ue&&ue.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};const m=t(Hr),p=Qe(),v=t(ks()),C=Kr();return ue=(a,i,{returnWallet:o=!0}={})=>{if(!a||typeof a!="object"||!Array.isArray(a.environments)||!(0,m.default)(a,"meta.did"))throw new Error("Blocklet state must be an object");const{environments:h,configs:n=[]}=a,S=[...n,...h],P=S.find(N=>N.key==="BLOCKLET_APP_DESCRIPTION"),g=S.find(N=>N.key==="BLOCKLET_PASSPORT_COLOR"),k=S.find(N=>N.key==="BLOCKLET_APP_URL"),c=S.find(N=>N.key==="BLOCKLET_APP_TENANT_MODE"),{did:f,version:r}=a.meta,s=(0,C.getDisplayName)(a),d=(0,m.default)(P,"value",a.meta.description),l=(0,m.default)(g,"value","auto"),u=(0,m.default)(k,"value",""),T=(0,m.default)(c,"value","");if(!o)return{did:f,version:r,name:s,description:d,passportColor:l,appUrl:u,secret:"",wallet:null,permanentWallet:null,tenantMode:T};const w=S.find(N=>N.key==="BLOCKLET_APP_SK"),R=S.find(N=>N.key==="BLOCKLET_APP_CHAIN_TYPE")||S.find(N=>N.key==="BLOCKLET_WALLET_TYPE"),M=S.find(N=>N.key==="BLOCKLET_APP_PSK");let F;R&&(R.value==="ethereum"||R.value==="eth")&&(F=R.value);let W=null,E=null;if(w&&w.value)W=(0,v.default)(w.value,void 0,F),M&&M.value&&M.value!==w.value&&(E=(0,v.default)(M.value,void 0,F));else{if(!i||typeof i!="string")throw new Error("Node secret key must be a string");R?W=(0,v.default)(a.meta.did,i,F):W=(0,v.default)(a.meta.did,i)}const D=a.settings?.session?.salt||"",U=p.Hasher.SHA3.hash256(qe.concat([W.secretKey,W.address,D].filter(Boolean).map(N=>qe.from(N))));return{did:f,version:r,name:s,description:d,passportColor:l,appUrl:u,secret:U,wallet:W,permanentWallet:E||W,tenantMode:T}},ue}var Is=Ps();const Ts=hr(Is);var Es={};function zt({teamDid:t,roles:m=[],apps:p=[],onCancel:v,onSuccess:C,onError:x=()=>{},endpoint:a=""}){const{api:i}=K(),{t:o,locale:h}=Z(),n=ke({loading:!1,error:null,activeStep:0,inviteInfo:null,role:"",remark:"",sourceAppPid:p.length>0?p[0].appPid:null,display:null,passportExpireTime:null,showPicker:!1}),S=async()=>{if(!n.role){n.error=o("team.member.error.passportEmpty");return}if(n.passportExpireTime&&He(n.passportExpireTime).isBefore(He())){n.error=o("team.passport.customExpireTimeIsInvalid");return}const f=n.remark.trim();n.error=null,n.loading=!0;try{let r=n.sourceAppPid??null;r===t&&(r=null);const s={teamDid:t,role:n.role,remark:f,sourceAppPid:r,passportExpireTime:n.passportExpireTime?n.passportExpireTime.toISOString():""};n.display&&(s.display={type:"url",content:n.display});const{inviteInfo:d}=await i.createMemberInvitation({input:s});n.inviteInfo=d,n.activeStep=1}catch(r){const s=ee(r);n.error=s,x(r)}finally{n.loading=!1}},P=m.find(f=>f.name===n.role),g=m.filter(f=>f.name!=="owner"),c=[{body:e.jsxs(O,{sx:{display:"flex",flexDirection:"column",gap:3},children:[p.length>1?e.jsxs(Me,{fullWidth:!0,children:[e.jsx(_e,{children:o("common.sourceApp")}),e.jsx(We,{value:n.sourceAppPid,onChange:f=>{n.error=null,n.sourceAppPid=f.target.value},fullWidth:!0,label:o("common.passport"),disabled:n.loading,children:p.map(f=>e.jsx(Ce,{value:f.appPid,children:e.jsxs(O,{sx:{display:"flex",justifyContent:"space-between",gap:2,width:"100%"},children:[e.jsxs(O,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(Br,{did:f.appPid,size:28}),f.appName]}),e.jsx(Mr,{did:f.appPid,compact:!0,responsive:!1})]})},f.appPid))})]}):null,e.jsxs(Me,{fullWidth:!0,variant:"outlined",children:[e.jsx(_e,{children:o("common.passport")}),e.jsx(We,{"data-cy":"invite-member-select-role",value:n.role,onChange:f=>{n.error=null,n.role=f.target.value},fullWidth:!0,label:o("common.passport"),disabled:n.loading,onKeyPress:f=>{f.key==="Enter"&&(f.preventDefault(),S())},children:g.map(f=>e.jsx(Ce,{value:f.name,"data-cy":`invite-member-select-option-${f.name}`,children:e.jsxs(O,{sx:{display:"flex",flexDirection:"column"},children:[e.jsx(X,{variant:"subtitle1",children:f.title||f.name}),e.jsx(X,{variant:"caption",sx:{opacity:.7},children:f.description})]})},f.name))})]}),P?.extra?.display==="custom"&&e.jsx(pe,{label:o("common.display"),type:"url",value:n.display,onChange:f=>{n.error=null,n.display=f.target.value},fullWidth:!0,variant:"outlined",margin:"normal"}),e.jsx(pe,{label:o("common.remark"),autoComplete:"off",variant:"outlined",fullWidth:!0,value:n.remark,onChange:f=>{n.error=null,n.remark=f.target.value},disabled:n.loading,"data-cy":"invite-member-input-remark"}),e.jsx(Bt,{value:n.passportExpireTime,onChange:f=>{n.error=null,n.passportExpireTime=f},showError:!1})]}),cancel:o("common.cancel"),confirm:o("team.member.inviteDialog.createInviteLink"),onCancel:v,onConfirm:S},{body:()=>{const f=Se({inviteId:n.inviteInfo?.inviteId,endpoint:a});return e.jsxs("div",{children:[e.jsx(O,{sx:{fontSize:16,fontWeight:"bold"},children:o("team.member.inviteDialog.createSuccessTip",{expireDate:he(n.inviteInfo?.expireDate,h)})}),e.jsx("div",{style:{marginTop:"40px"}}),e.jsx(Pe,{children:f})]})},confirm:o("common.copy"),onConfirm:()=>{const f=Se({inviteId:n.inviteInfo?.inviteId,endpoint:a});if(["1","true"].includes(Es.IS_E2E)){C();return}ns(f),Y.success(o("common.copied")),C()},cancel:o("common.cancel"),onCancel:v}][n.activeStep];return e.jsxs(re,{title:o("common.invite"),fullWidth:!0,open:!0,showCloseButton:!1,actions:e.jsxs(e.Fragment,{children:[c.cancel&&e.jsx($,{onClick:c.onCancel,color:"inherit",children:c.cancel}),e.jsxs($,{onClick:c.onConfirm,color:"primary",disabled:n.loading||!n.role,variant:"contained",autoFocus:!0,children:[n.loading&&e.jsx(ae,{size:16}),c.confirm]})]}),children:[e.jsx(Ze,{component:"div",children:typeof c.body=="function"?c.body():c.body}),!!n.error&&e.jsx(ie,{severity:"error",sx:{mt:2},children:n.error})]})}zt.propTypes={teamDid:b.string.isRequired,onCancel:b.func.isRequired,onSuccess:b.func.isRequired,onError:b.func,roles:b.array,apps:b.array,endpoint:b.string};function Ht({teamDid:t,onCancel:m,onSuccess:p,onError:v=()=>{},endpoint:C=""}){const{api:x,info:a}=K(),{api:i}=y.useContext(Vr),[o,h]=y.useState(!1),{t:n,locale:S}=Z(),[P,g]=y.useState(""),[k,c]=y.useState(!1),[f,r]=y.useState(0),[s,d]=y.useState(""),[l,u]=y.useState(""),T=!!$e(a,"ownerNft.did"),w=cs(async()=>{if(T){const{state:D}=await x.getDelegationState();return D}return{delegated:!0}});if(w.loading)return e.jsx(re,{title:n("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,onClose:m,children:e.jsx("div",{style:{display:"flex",justifyContent:"center"},children:e.jsx(ae,{})})});if(w.error)return e.jsx(re,{title:n("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,onClose:m,children:e.jsx(ie,{severity:"error",children:ee(w.error)})});const R=async()=>{g(null),h(!0);try{const{inviteInfo:D}=await x.createTransferInvitation({input:{teamDid:t,role:"owner",remark:l.trim()}});d(D),r(W.length-1)}catch(D){const U=ee(D);g(U),v(D)}finally{h(!1)}},M=()=>{c(!0),r(1)},F=()=>{c(!1),r(0)},W=[{body:e.jsxs(X,{component:"div",children:[e.jsxs(ie,{severity:"warning",children:[e.jsx(X,{children:n("team.transferNode.inviteDialog.tips.progress")}),e.jsx(X,{children:n("team.transferNode.inviteDialog.tips.newOwnerPermissions")})]}),e.jsx(ie,{severity:"warning",children:e.jsx(X,{children:n("team.transferNode.inviteDialog.tips.revoke")})}),e.jsx("div",{style:{marginTop:20,marginBottom:10}}),e.jsx(pe,{label:n("common.remark"),autoComplete:"off",variant:"outlined",fullWidth:!0,style:{marginBottom:8},value:l,onChange:D=>{g(null),u(D.target.value)},disabled:o,"data-cy":"transfer-node-input-remark"}),e.jsx("div",{style:{marginTop:20,marginBottom:10}})]}),cancel:n("common.cancel"),confirm:n("team.transferNode.inviteDialog.createInviteLink"),onCancel:m,onConfirm:T&&!$e(w,"value.delegated")?M:R},{body:()=>e.jsx(Zr,{action:"delegate-transfer-nft",open:k,locale:S,checkFn:i.get,onClose:F,onSuccess:R,checkTimeout:5*60*1e3,webWalletUrl:Qr(a),extraParams:{targetDID:a.did},messages:{title:n("team.transferNode.delegateDialog.title"),scan:n("team.transferNode.delegateDialog.scan"),confirm:n("team.transferNode.delegateDialog.confirm"),success:n("team.transferNode.delegateDialog.success")},popup:!0})},{body:()=>{const D=Se({inviteId:s.inviteId,endpoint:C});return e.jsxs("div",{children:[e.jsx(As,{children:n("team.transferNode.inviteDialog.createSuccessTip",{expireDate:he(s.expireDate,S)})}),e.jsx("div",{style:{marginTop:"40px"}}),e.jsx(Pe,{children:D})]})},confirm:n("common.confirm"),onConfirm:p}],E=W[f];return e.jsxs(re,{title:n("team.transferNode.inviteDialog.title"),fullWidth:!0,open:!0,showCloseButton:!1,actions:e.jsxs(e.Fragment,{children:[E.cancel&&e.jsx($,{onClick:E.onCancel,color:"inherit",children:E.cancel}),e.jsxs($,{onClick:E.onConfirm,color:"primary",disabled:o,variant:"contained",autoFocus:!0,children:[o&&e.jsx(ae,{size:16}),E.confirm]})]}),children:[e.jsx(Ze,{component:"div",children:typeof E.body=="function"?E.body():E.body}),!!P&&e.jsx(ie,{severity:"error",children:P})]})}Ht.propTypes={teamDid:b.string.isRequired,onCancel:b.func.isRequired,onSuccess:b.func.isRequired,onError:b.func,endpoint:b.string};const As=z.div`
|
|
2
2
|
font-size: 16px;
|
|
3
3
|
font-weight: bold;
|
|
4
4
|
`;function Ke({passport:t,onDelete:m=null,...p}){return e.jsxs(Ds,{...p,children:[t.title||t.name," ",!!m&&e.jsx(xr,{"data-cy":"delete-issuance",className:"delete",onClick:m})]})}Ke.propTypes={passport:b.object.isRequired,onDelete:b.func};const Ds=z.span`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{T as M,H as q,ab as N,N as Y,O as ve,ac as Ce,ai as Se}from"./vendor-ux-ESjuHpb6.js";import{o as Te,k as le,t as Ie}from"./vendor-hooks-DLNZ8kxG.js";import{r as E,a as ae}from"./vendor-react-Dvs43sk9.js";import{j as e,Y as Re,bB as We,$ as ze,ak as p,z as se,T as C,a6 as F,aX as te,R as De,Q as H,b6 as ne,am as A,bd as _,a5 as J,V as Z,S as G,b4 as Oe,U as L,I as B,ci as $e,bf as Ae,a7 as Pe,F as qe,W as t,b1 as R,a3 as ce,c1 as ee,cj as Le,aO as Me,aP as Be,ck as Fe,cl as He,cm as Ne,s as oe,aU as Ue,aj as _e,J as Ke,cn as Ve,aZ as Ye,cg as Je,ch as Qe,cf as Xe}from"./vendor-mui-core-CmD-NPnl.js";import{B as de,o as pe,l as ue}from"./index-BE6_aQqm.js";import{Z as K,c as xe,ap as Ze,a8 as Ge,b8 as Q}from"./index-6k6hDX7K.js";import{u as V}from"./team-RDmDo4cZ.js";import{u as et}from"./use-mobile-D93Bk2Ru.js";import{u as tt,C as X}from"./index.esm-JPZAjt0x.js";import{C as he,a as me,J as ot}from"./vendor-utils-DQK0pEML.js";import{C as st}from"./confirm-BSaR4_fO.js";import{A as nt}from"./actions-CL4xTGOh.js";import{T as ie}from"./table-tips-B7dQ0Rgb.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-C-xQV6LY.js";import"./session-D-9YOhAy.js";import"./isURL-BOLVWN6q.js";import"./use-app-logo-DesKuFha.js";import"./index-DBs9Ljax.js";const it=i=>{const[u,c]=E.useState(null),[b,r]=E.useState(!0),[w,x]=E.useState(null),j=window.blocklet?.appUrl,l=E.useMemo(()=>{const g={};return u&&(u.sources.forEach(y=>{g[y.did]={source:y,events:[],count:0}}),u.events.forEach(y=>{g[y.source]&&(g[y.source].events.push(y),g[y.source].count+=1)})),g},[u]),f=async()=>{try{if(r(!0),!j)return;const y=await(await fetch(he(j,xe.WELLKNOWN_SERVICE_PATH_PREFIX,"/openevent.json"))).json();c(y),x(null)}catch(g){x(g instanceof Error?g:new Error(String(g)))}finally{r(!1)}};return E.useEffect(()=>{f()},[j]),{openEvent:u,setOpenEvent:c,eventsBySource:l,loading:b,error:w,loadData:f}};function ge({eventsBySource:i,selectedEvents:u,setSelectedEvents:c,error:b=null}){const{t:r}=M(),[w,x]=E.useState({}),j=E.useMemo(()=>{const n={};return Object.entries(i).forEach(([a,{events:m}])=>{const v=m.filter(S=>u[`${S.type}-${S.source}`]).length;n[a]=v}),n},[i,u]),l=E.useMemo(()=>Object.values(j).reduce((n,a)=>n+a,0),[j]),f=E.useMemo(()=>Object.values(i).reduce((n,{events:a})=>n+a.length,0),[i]),g=(n,a)=>{a.stopPropagation(),x({...w,[n]:!w[n]})},y=n=>{const a=`${n.type}-${n.source}`;c(m=>({...m,[a]:!m[a]}))},z=(n,a)=>{const m={};n.forEach(v=>{const S=`${v.type}-${v.source}`;m[S]=!a}),c(v=>({...v,...m}))},T=n=>{const a={};Object.values(i).forEach(({events:m})=>{m.forEach(v=>{const S=`${v.type}-${v.source}`;a[S]=n.target.checked})}),c(a)};return e.jsxs(p,{sx:{width:"100%"},children:[e.jsxs(p,{sx:{display:"flex",alignItems:"center",mb:1,mt:1},children:[e.jsx(ne,{control:e.jsx(J,{onChange:T,checked:l>0&&l===f}),label:e.jsxs(p,{sx:{display:"flex",alignItems:"center",cursor:"pointer"},children:[r("webhookEndpoint.selectAllEvents"),e.jsx(p,{sx:{display:"flex",alignItems:"center"},children:e.jsx(A,{title:r("webhookEndpoint.selectAllEventsTooltip"),placement:"right",children:e.jsx(_,{fontSize:"small",sx:{ml:.5,cursor:"help"}})})})]}),sx:{m:0}}),l>0&&e.jsx(C,{variant:"body2",color:"primary",sx:{ml:"auto"},children:r("webhookEndpoint.selectedEventsCount",{count:l})})]}),e.jsx(p,{sx:{maxHeight:"50vh",overflow:"auto"},children:e.jsx(Z,{disablePadding:!0,sx:{border:"1px solid",borderColor:"divider",borderRadius:"4px"},children:Object.entries(i).map(([n,{source:a,events:m,count:v}],S)=>{const D=j[n]>0,I=j[n]===m.length&&m.length>0,O=w[n];return e.jsxs(ae.Fragment,{children:[e.jsx(G,{sx:{borderBottom:({palette:o})=>S<Object.keys(i).length-1?`1px solid ${o.divider}`:"none",px:2,py:1.5,"&:hover":{bgcolor:"rgba(0, 0, 0, 0.02)"}},children:e.jsxs(p,{sx:{display:"flex",width:"100%",justifyContent:"space-between",alignItems:"center"},onClick:o=>{o.target.closest(".MuiFormControlLabel-root")||g(n,o)},children:[e.jsx(p,{sx:{display:"flex",alignItems:"center"},children:m.length>0&&e.jsx(ne,{control:e.jsx(J,{checked:I,indeterminate:D&&!I,onChange:o=>{o.stopPropagation(),z(m,I)}}),label:e.jsxs(p,{sx:{display:"flex",alignItems:"center",gap:1},children:[a.logo&&e.jsx(Oe,{src:a.logo,sx:{width:24,height:24}}),e.jsx(p,{children:a.title||n}),D&&e.jsx(L,{label:r("webhookEndpoint.selectedCount",{count:j[n]}),size:"small",sx:{mt:"2px",height:"20px",fontSize:"12px",bgcolor:o=>`${o.palette.primary.main}20`,color:"primary.main",fontWeight:500}})]}),sx:{m:0,"& .MuiFormControlLabel-label":{flex:1}}})}),e.jsxs(p,{sx:{display:"flex",alignItems:"center"},children:[e.jsx(C,{variant:"body2",sx:{color:"text.secondary",mr:1},children:r("webhookEndpoint.eventsCount",{count:v})}),m.length>0&&e.jsx(B,{size:"small",edge:"end",children:O?e.jsx($e,{}):e.jsx(Ae,{})})]})]})}),m.length>0&&e.jsx(Pe,{in:O,timeout:"auto",unmountOnExit:!0,children:e.jsx(Z,{disablePadding:!0,sx:{pl:2,pr:2,py:1,bgcolor:"rgba(0, 0, 0, 0.01)"},children:m.map(o=>{const d=`${o.type}-${o.source}`,s=!!u[d];return e.jsx(G,{dense:!0,sx:{py:.75},onClick:()=>y(o),children:e.jsxs(p,{sx:{display:"flex",alignItems:"flex-start",width:"100%"},children:[e.jsx(J,{checked:s,sx:{mr:1}}),e.jsxs(p,{children:[e.jsx(C,{variant:"body1",sx:{cursor:"pointer",color:"text.primary"},children:o.type}),e.jsx(C,{variant:"caption",sx:{color:"text.secondary",display:"block",cursor:"pointer"},children:o.description})]})]})},d)})})})]},n)})})}),b&&e.jsx(qe,{error:!0,sx:{mt:1},children:b})]})}ge.propTypes={eventsBySource:t.objectOf(t.shape({source:t.shape({did:t.string.isRequired,title:t.string,description:t.string,version:t.string,logo:t.string}).isRequired,events:t.arrayOf(t.shape({type:t.string.isRequired,description:t.string.isRequired,source:t.string.isRequired})).isRequired,count:t.number.isRequired})).isRequired,selectedEvents:t.objectOf(t.bool).isRequired,setSelectedEvents:t.func.isRequired,error:t.string};function fe({id:i=null,url:u="",description:c="",enabledEvents:b=[],onSubmit:r,onClose:w=()=>{}}){const{t:x}=M(),[j,l]=E.useState({}),{teamDid:f}=V(),{api:g}=K(),{loading:y,error:z,eventsBySource:T}=it(),{control:n,handleSubmit:a,formState:{errors:m},reset:v,setValue:S,trigger:D}=tt({defaultValues:{url:"",description:""}});E.useEffect(()=>{const o=Object.values(j).some(d=>d);S("selectedEvents",o?"valid":""),D("selectedEvents")},[j,S,D]);const I=()=>{l({}),v(),w()},O=async o=>{const d=Object.keys(j).filter(h=>j[h]),s={url:o.url,description:o.description,enabledEvents:d.map(h=>{const[k,W]=h.split("-");return!k||!W?null:{type:k,source:W}}).filter(Boolean)};try{if(i){const h=await g.updateWebhookEndpoint({input:{teamDid:f,id:i,data:s}});q.success(`${x("webhookEndpoint.updateWebhook")} ${x("webhookEndpoint.success")}`),r(h)}else{const h=await g.createWebhookEndpoint({input:{teamDid:f,input:s}});q.success(`${x("webhookEndpoint.createWebhook")} ${x("webhookEndpoint.success")}`),r(h)}}catch(h){q.error(h?.message)}I()};return E.useEffect(()=>{v({url:u,description:c}),l(b.reduce((o,d)=>(o[`${d.type}-${d.source}`]=!0,o),{}))},[v,l,u,c,b]),e.jsx(Re,{open:!0,onClose:I,maxWidth:"lg",fullWidth:!0,sx:{"& .MuiDialog-paper":{minHeight:600}},children:e.jsxs("form",{onSubmit:a(O),children:[e.jsx(We,{children:x(i?"webhookEndpoint.editWebhookTitle":"webhookEndpoint.createWebhookTitle")}),e.jsx(ze,{children:e.jsxs(p,{sx:{display:"flex",flexDirection:"column",gap:2,mt:2},children:[e.jsx(X,{name:"url",control:n,rules:{required:x("webhookEndpoint.validation.urlRequired"),pattern:{value:/^(http|https):\/\/[^ "]+$/,message:x("webhookEndpoint.validation.urlInvalid")}},render:({field:o})=>e.jsx(se,{...o,label:x("webhookEndpoint.url.label"),fullWidth:!0,error:!!m.url,helperText:m.url?.message})}),e.jsx(X,{name:"description",control:n,rules:{required:x("webhookEndpoint.validation.descriptionRequired")},render:({field:o})=>e.jsx(se,{...o,label:x("webhookEndpoint.description.label"),fullWidth:!0,multiline:!0,minRows:2,maxRows:4,error:!!m.description,helperText:m.description?.message})}),e.jsx(X,{name:"selectedEvents",control:n,rules:{required:x("webhookEndpoint.validation.eventRequired")},render:({field:o})=>e.jsx("input",{type:"hidden",...o})}),!y&&T&&Object.keys(T).length>0&&e.jsx(ge,{eventsBySource:T,selectedEvents:j,setSelectedEvents:l,error:m.selectedEvents?.message}),!y&&(!T||Object.keys(T).length===0)&&e.jsx(C,{sx:{color:"text.secondary"},children:x("webhookEndpoint.noAvailableEvents")}),y&&e.jsx(p,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"500px",width:"100%"},children:e.jsx(F,{size:20})}),z&&e.jsx(te,{severity:"error",children:x("webhookEndpoint.loadingError",{message:z?.message})})]})}),e.jsxs(De,{sx:{p:"8px 24px 24px"},children:[e.jsx(H,{onClick:I,children:x("common.cancel")}),e.jsx(H,{type:"submit",variant:"contained",color:"primary",children:x(i?"webhookEndpoint.updateWebhook":"webhookEndpoint.saveWebhook")})]})]})})}fe.propTypes={onSubmit:t.func.isRequired,id:t.string,url:t.string,description:t.string,enabledEvents:t.arrayOf(t.shape({type:t.string.isRequired,source:t.string.isRequired})),onClose:t.func};function be(i){switch(i){case"enabled":return"success";case"disabled":default:return"default"}}const rt=(i="en")=>i==="tw"?"zh":i;function U(i,u="YYYY-MM-DD HH:mm:ss",c="en"){return i?Ze(i).locale(rt(c)).format(u):"-"}function lt(i){return typeof i=="number"?!1:me(i)}function at(i){return i>=200&&i<300}function $({value:i,label:u,tip:c="",divider:b=!1}){const r=lt(i);return e.jsxs(e.Fragment,{children:[e.jsxs(R,{direction:"column",alignItems:"flex-start",children:[e.jsxs(C,{component:"div",variant:"body1",mb:1,color:"text.primary",sx:{fontWeight:500},children:[u,!!c&&e.jsx(A,{title:c,children:e.jsx(_,{fontSize:"small"})})]}),e.jsx(C,{component:"div",variant:"body1",color:r?"text.disabled":"text.secondary",sx:{width:"100%",minHeight:"24px"},children:r?"-":i})]}),b&&e.jsx(ce,{orientation:"vertical",flexItem:!0})]})}$.propTypes={label:t.oneOfType([t.string,t.node]).isRequired,value:t.oneOfType([t.string,t.node]).isRequired,tip:t.oneOfType([t.string,t.node]),divider:t.bool};function je({title:i,children:u=null,mb:c=1.5,mt:b=1.5}){return e.jsxs(R,{className:"section-header",direction:"row",sx:{justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:1,mb:c,mt:b,pb:1},children:[e.jsx(C,{variant:"h3",sx:{fontSize:{xs:"18px",md:"1.09375rem"}},component:"div",children:i}),u]})}je.propTypes={title:t.oneOfType([t.string,t.node]).isRequired,children:t.node,mb:t.number,mt:t.number};const ct={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4m-4 4a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"/>'},dt=i=>{const u={};return i.forEach(c=>{const b=new Date(c.createdAt).toLocaleDateString();u[b]||(u[b]=[]),u[b]?.push(c)}),u};function ye({eventId:i="",webhookEndpointId:u="",event:c=null}){const{api:b,ws:{useSubscription:r}}=K(),{t:w}=M(),{teamDid:x}=V(),{blocklet:j}=Ge(),{data:l,loadMore:f,loadingMore:g,loading:y,mutate:z}=Te(s=>{const k=s?Math.ceil(s.list.length/15)+1:1;return b.getWebhookAttempts({input:{teamDid:x,input:{eventId:i,webhookId:u},paging:{page:k,pageSize:15}}})},{reloadDeps:[i,u]}),T=l?.list||[],[n,a]=E.useState(null),[m,v]=E.useState(!1),S=dt(T);if(E.useEffect(()=>{!n&&l?.list.length&&a(l.list[0])},[l?.list.length,n]),r(xe.EVENTS.WEBHOOK_ATTEMPT,s=>{z(h=>{if(h.list.find(W=>W.id===s.id)){const W=h.list.map(P=>P.id===s.id?{...P,...s}:P);return{...h,list:W}}return s.endpoint=h.list[0]?.endpoint,s.event=h.list[0]?.event,{...h,list:[s,...h.list]}})},[]),y)return e.jsx(F,{});const D=l&&l.list.length<l.paging.total,I=async()=>{n&&(v(!0),await b.retryWebhookAttempt({input:{teamDid:x,eventId:n.event.id,webhookId:u,attemptId:n.id}}).finally(()=>{setTimeout(()=>{v(!1)},1e3)}))},O=s=>{if(s.responseBody&&s.responseBody?.sessionId&&s.responseBody?.projectId&&s.responseBody?.agentId){const h=j?.site?.domainAliases[0]?.value,k=(j.children||[]).find(P=>P?.meta?.name==="ai-studio"),W=ot(he(`https://${h}`,k?.mountPoint||"","projects",s.responseBody.projectId,"logs/main"),{sessionId:s.responseBody.sessionId,agentId:s.responseBody.agentId});return e.jsx(B,{sx:{fontSize:20},onClick:()=>window.open(W,"_blank"),children:e.jsx(p,{component:N,icon:Q})})}return null},o=s=>s.status==="pending"?e.jsx(Fe,{color:"warning"}):at(s.responseStatus)?e.jsx(He,{color:"success"}):e.jsx(Ne,{color:"error"}),d=n?.triggeredFrom&&(l?.list||[]).find(s=>s.id===n.triggeredFrom);return e.jsxs(pt,{container:!0,spacing:{xs:0,md:1},sx:{height:1},children:[e.jsx(ee,{size:{xs:12,md:4},sx:{height:1},children:me(Object.keys(S))?e.jsx(C,{sx:{color:"text.secondary"},children:w("webhookEndpoint.waitingForEvents")}):e.jsxs(e.Fragment,{children:[e.jsx(Z,{sx:{maxHeight:"calc(100% - 40px)",py:0,overflowY:"auto"},children:Object.entries(S).map(([s,h])=>e.jsxs(ae.Fragment,{children:[e.jsx(Le,{sx:{p:0},children:s}),h.map(k=>e.jsxs(G,{sx:{cursor:"pointer",px:1},onClick:()=>a(k),selected:n&&n?.id===k?.id,secondaryAction:e.jsx(C,{sx:{color:"text.secondary"},children:U(k.createdAt,"HH:mm:ss")}),children:[e.jsx(Me,{sx:{minWidth:0,mr:1.5},children:o(k)}),e.jsx(Be,{primary:e.jsx(C,{sx:{color:"text.primary"},children:k.event.type})})]},k.id))]},s))}),D&&e.jsx(p,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:1},children:e.jsx(H,{variant:"text",type:"button",color:"inherit",onClick:f,disabled:g,sx:{color:s=>s.palette.text.disabled},children:w(g?"webhookEndpoint.loadingMore":"webhookEndpoint.loadMore")})})]})}),e.jsxs(ee,{size:{xs:12,md:8},sx:{height:1},children:[n&&e.jsxs(R,{direction:"column",spacing:2,sx:{height:1,overflow:"auto",pl:{xs:0,md:1},mt:{xs:2,md:0},borderLeft:{xs:"none"}},children:[e.jsxs(p,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e.jsxs(p,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(C,{variant:"h4",children:w(`common.${n.status}`)}),e.jsx(p,{children:O(n)})]}),e.jsxs(p,{sx:{display:"flex",alignItems:"center",gap:1},children:[d&&e.jsx(A,{placement:"left",title:e.jsxs(R,{onClick:()=>a(d),sx:{gap:1,cursor:"pointer",".did-address-text":{color:"common.white"}},children:[e.jsx(de,{showDid:!0,did:n.triggeredBy,cardType:ue.Detailed,infoType:pe.Minimal,sx:{border:0,padding:0,minWidth:0,".MuiTypography-root":{color:"common.white",fontWeight:400}}}),e.jsx(ce,{}),e.jsxs(p,{sx:{display:"flex",flexDirection:"column"},children:[e.jsx(C,{variant:"body2",sx:{color:"primary.main"},children:w("webhookEndpoint.triggeredFrom")}),e.jsxs(p,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(C,{variant:"body2",children:n.id}),e.jsx(B,{onClick:()=>a(d),children:e.jsx(p,{component:N,icon:Q,sx:{fontSize:16,color:"common.white"}})})]})]})]}),slotProps:{tooltip:{sx:{maxWidth:400}}},children:e.jsx(B,{onClick:()=>a(d),children:e.jsx(p,{component:N,icon:Q,sx:{fontSize:16}})})}),e.jsxs(H,{variant:"outlined",color:"primary",size:"small",onClick:I,disabled:m,children:[e.jsx(p,{component:N,icon:ct,sx:{fontSize:16,animation:m?"spin 1s linear infinite":"none",mr:.5}}),w("notification.resend")]})]})]}),e.jsxs(p,{children:[e.jsxs(C,{variant:"h6",children:[w("webhookEndpoint.response")," (",n.responseStatus,")"]}),e.jsx(Y,{language:"json",children:JSON.stringify(n.responseBody,null,2)})]}),e.jsxs(p,{children:[e.jsx(R,{direction:"row",spacing:1,sx:{alignItems:"center"},children:e.jsx(C,{variant:"h6",children:w("webhookEndpoint.request")})}),e.jsx(Y,{language:"json",sx:{margin:0},children:JSON.stringify(n.event,null,2)})]})]}),l?.list.length===0&&c&&e.jsxs(p,{children:[e.jsx(R,{direction:"row",spacing:1,sx:{alignItems:"center"},children:e.jsx(C,{variant:"h6",children:w("webhookEndpoint.eventData")})}),e.jsx(Y,{language:"json",sx:{margin:0},children:JSON.stringify(c.data,null,2)})]})]})]})}ye.propTypes={eventId:t.string,webhookEndpointId:t.string,event:t.shape({type:t.string,data:t.object,request:t.object,requestInfo:t.object})};const pt=oe(ee)`
|
|
1
|
+
import{T as M,H as q,ab as N,N as Y,O as ve,ac as Ce,ai as Se}from"./vendor-ux-pYOhjQLA.js";import{o as Te,k as le,t as Ie}from"./vendor-hooks-DLNZ8kxG.js";import{r as E,a as ae}from"./vendor-react-Dvs43sk9.js";import{j as e,Y as Re,bB as We,$ as ze,ak as p,z as se,T as C,a6 as F,aX as te,R as De,Q as H,b6 as ne,am as A,bd as _,a5 as J,V as Z,S as G,b4 as Oe,U as L,I as B,ci as $e,bf as Ae,a7 as Pe,F as qe,W as t,b1 as R,a3 as ce,c1 as ee,cj as Le,aO as Me,aP as Be,ck as Fe,cl as He,cm as Ne,s as oe,aU as Ue,aj as _e,J as Ke,cn as Ve,aZ as Ye,cg as Je,ch as Qe,cf as Xe}from"./vendor-mui-core-CmD-NPnl.js";import{B as de,o as pe,l as ue}from"./index-DDpL_qpY.js";import{Z as K,c as xe,ap as Ze,a8 as Ge,b8 as Q}from"./index-D5Esor4q.js";import{u as V}from"./team-CGGZIbfh.js";import{u as et}from"./use-mobile-D93Bk2Ru.js";import{u as tt,C as X}from"./index.esm-JPZAjt0x.js";import{C as he,a as me,J as ot}from"./vendor-utils-DQK0pEML.js";import{C as st}from"./confirm-DUjUXcfn.js";import{A as nt}from"./actions-CL4xTGOh.js";import{T as ie}from"./table-tips-CgCabdgD.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-DEa0A9MF.js";import"./session-DGB-yOme.js";import"./isURL-DZGsNcmL.js";import"./use-app-logo-DxlfjGOQ.js";import"./index-DBs9Ljax.js";const it=i=>{const[u,c]=E.useState(null),[b,r]=E.useState(!0),[w,x]=E.useState(null),j=window.blocklet?.appUrl,l=E.useMemo(()=>{const g={};return u&&(u.sources.forEach(y=>{g[y.did]={source:y,events:[],count:0}}),u.events.forEach(y=>{g[y.source]&&(g[y.source].events.push(y),g[y.source].count+=1)})),g},[u]),f=async()=>{try{if(r(!0),!j)return;const y=await(await fetch(he(j,xe.WELLKNOWN_SERVICE_PATH_PREFIX,"/openevent.json"))).json();c(y),x(null)}catch(g){x(g instanceof Error?g:new Error(String(g)))}finally{r(!1)}};return E.useEffect(()=>{f()},[j]),{openEvent:u,setOpenEvent:c,eventsBySource:l,loading:b,error:w,loadData:f}};function ge({eventsBySource:i,selectedEvents:u,setSelectedEvents:c,error:b=null}){const{t:r}=M(),[w,x]=E.useState({}),j=E.useMemo(()=>{const n={};return Object.entries(i).forEach(([a,{events:m}])=>{const v=m.filter(S=>u[`${S.type}-${S.source}`]).length;n[a]=v}),n},[i,u]),l=E.useMemo(()=>Object.values(j).reduce((n,a)=>n+a,0),[j]),f=E.useMemo(()=>Object.values(i).reduce((n,{events:a})=>n+a.length,0),[i]),g=(n,a)=>{a.stopPropagation(),x({...w,[n]:!w[n]})},y=n=>{const a=`${n.type}-${n.source}`;c(m=>({...m,[a]:!m[a]}))},z=(n,a)=>{const m={};n.forEach(v=>{const S=`${v.type}-${v.source}`;m[S]=!a}),c(v=>({...v,...m}))},T=n=>{const a={};Object.values(i).forEach(({events:m})=>{m.forEach(v=>{const S=`${v.type}-${v.source}`;a[S]=n.target.checked})}),c(a)};return e.jsxs(p,{sx:{width:"100%"},children:[e.jsxs(p,{sx:{display:"flex",alignItems:"center",mb:1,mt:1},children:[e.jsx(ne,{control:e.jsx(J,{onChange:T,checked:l>0&&l===f}),label:e.jsxs(p,{sx:{display:"flex",alignItems:"center",cursor:"pointer"},children:[r("webhookEndpoint.selectAllEvents"),e.jsx(p,{sx:{display:"flex",alignItems:"center"},children:e.jsx(A,{title:r("webhookEndpoint.selectAllEventsTooltip"),placement:"right",children:e.jsx(_,{fontSize:"small",sx:{ml:.5,cursor:"help"}})})})]}),sx:{m:0}}),l>0&&e.jsx(C,{variant:"body2",color:"primary",sx:{ml:"auto"},children:r("webhookEndpoint.selectedEventsCount",{count:l})})]}),e.jsx(p,{sx:{maxHeight:"50vh",overflow:"auto"},children:e.jsx(Z,{disablePadding:!0,sx:{border:"1px solid",borderColor:"divider",borderRadius:"4px"},children:Object.entries(i).map(([n,{source:a,events:m,count:v}],S)=>{const D=j[n]>0,I=j[n]===m.length&&m.length>0,O=w[n];return e.jsxs(ae.Fragment,{children:[e.jsx(G,{sx:{borderBottom:({palette:o})=>S<Object.keys(i).length-1?`1px solid ${o.divider}`:"none",px:2,py:1.5,"&:hover":{bgcolor:"rgba(0, 0, 0, 0.02)"}},children:e.jsxs(p,{sx:{display:"flex",width:"100%",justifyContent:"space-between",alignItems:"center"},onClick:o=>{o.target.closest(".MuiFormControlLabel-root")||g(n,o)},children:[e.jsx(p,{sx:{display:"flex",alignItems:"center"},children:m.length>0&&e.jsx(ne,{control:e.jsx(J,{checked:I,indeterminate:D&&!I,onChange:o=>{o.stopPropagation(),z(m,I)}}),label:e.jsxs(p,{sx:{display:"flex",alignItems:"center",gap:1},children:[a.logo&&e.jsx(Oe,{src:a.logo,sx:{width:24,height:24}}),e.jsx(p,{children:a.title||n}),D&&e.jsx(L,{label:r("webhookEndpoint.selectedCount",{count:j[n]}),size:"small",sx:{mt:"2px",height:"20px",fontSize:"12px",bgcolor:o=>`${o.palette.primary.main}20`,color:"primary.main",fontWeight:500}})]}),sx:{m:0,"& .MuiFormControlLabel-label":{flex:1}}})}),e.jsxs(p,{sx:{display:"flex",alignItems:"center"},children:[e.jsx(C,{variant:"body2",sx:{color:"text.secondary",mr:1},children:r("webhookEndpoint.eventsCount",{count:v})}),m.length>0&&e.jsx(B,{size:"small",edge:"end",children:O?e.jsx($e,{}):e.jsx(Ae,{})})]})]})}),m.length>0&&e.jsx(Pe,{in:O,timeout:"auto",unmountOnExit:!0,children:e.jsx(Z,{disablePadding:!0,sx:{pl:2,pr:2,py:1,bgcolor:"rgba(0, 0, 0, 0.01)"},children:m.map(o=>{const d=`${o.type}-${o.source}`,s=!!u[d];return e.jsx(G,{dense:!0,sx:{py:.75},onClick:()=>y(o),children:e.jsxs(p,{sx:{display:"flex",alignItems:"flex-start",width:"100%"},children:[e.jsx(J,{checked:s,sx:{mr:1}}),e.jsxs(p,{children:[e.jsx(C,{variant:"body1",sx:{cursor:"pointer",color:"text.primary"},children:o.type}),e.jsx(C,{variant:"caption",sx:{color:"text.secondary",display:"block",cursor:"pointer"},children:o.description})]})]})},d)})})})]},n)})})}),b&&e.jsx(qe,{error:!0,sx:{mt:1},children:b})]})}ge.propTypes={eventsBySource:t.objectOf(t.shape({source:t.shape({did:t.string.isRequired,title:t.string,description:t.string,version:t.string,logo:t.string}).isRequired,events:t.arrayOf(t.shape({type:t.string.isRequired,description:t.string.isRequired,source:t.string.isRequired})).isRequired,count:t.number.isRequired})).isRequired,selectedEvents:t.objectOf(t.bool).isRequired,setSelectedEvents:t.func.isRequired,error:t.string};function fe({id:i=null,url:u="",description:c="",enabledEvents:b=[],onSubmit:r,onClose:w=()=>{}}){const{t:x}=M(),[j,l]=E.useState({}),{teamDid:f}=V(),{api:g}=K(),{loading:y,error:z,eventsBySource:T}=it(),{control:n,handleSubmit:a,formState:{errors:m},reset:v,setValue:S,trigger:D}=tt({defaultValues:{url:"",description:""}});E.useEffect(()=>{const o=Object.values(j).some(d=>d);S("selectedEvents",o?"valid":""),D("selectedEvents")},[j,S,D]);const I=()=>{l({}),v(),w()},O=async o=>{const d=Object.keys(j).filter(h=>j[h]),s={url:o.url,description:o.description,enabledEvents:d.map(h=>{const[k,W]=h.split("-");return!k||!W?null:{type:k,source:W}}).filter(Boolean)};try{if(i){const h=await g.updateWebhookEndpoint({input:{teamDid:f,id:i,data:s}});q.success(`${x("webhookEndpoint.updateWebhook")} ${x("webhookEndpoint.success")}`),r(h)}else{const h=await g.createWebhookEndpoint({input:{teamDid:f,input:s}});q.success(`${x("webhookEndpoint.createWebhook")} ${x("webhookEndpoint.success")}`),r(h)}}catch(h){q.error(h?.message)}I()};return E.useEffect(()=>{v({url:u,description:c}),l(b.reduce((o,d)=>(o[`${d.type}-${d.source}`]=!0,o),{}))},[v,l,u,c,b]),e.jsx(Re,{open:!0,onClose:I,maxWidth:"lg",fullWidth:!0,sx:{"& .MuiDialog-paper":{minHeight:600}},children:e.jsxs("form",{onSubmit:a(O),children:[e.jsx(We,{children:x(i?"webhookEndpoint.editWebhookTitle":"webhookEndpoint.createWebhookTitle")}),e.jsx(ze,{children:e.jsxs(p,{sx:{display:"flex",flexDirection:"column",gap:2,mt:2},children:[e.jsx(X,{name:"url",control:n,rules:{required:x("webhookEndpoint.validation.urlRequired"),pattern:{value:/^(http|https):\/\/[^ "]+$/,message:x("webhookEndpoint.validation.urlInvalid")}},render:({field:o})=>e.jsx(se,{...o,label:x("webhookEndpoint.url.label"),fullWidth:!0,error:!!m.url,helperText:m.url?.message})}),e.jsx(X,{name:"description",control:n,rules:{required:x("webhookEndpoint.validation.descriptionRequired")},render:({field:o})=>e.jsx(se,{...o,label:x("webhookEndpoint.description.label"),fullWidth:!0,multiline:!0,minRows:2,maxRows:4,error:!!m.description,helperText:m.description?.message})}),e.jsx(X,{name:"selectedEvents",control:n,rules:{required:x("webhookEndpoint.validation.eventRequired")},render:({field:o})=>e.jsx("input",{type:"hidden",...o})}),!y&&T&&Object.keys(T).length>0&&e.jsx(ge,{eventsBySource:T,selectedEvents:j,setSelectedEvents:l,error:m.selectedEvents?.message}),!y&&(!T||Object.keys(T).length===0)&&e.jsx(C,{sx:{color:"text.secondary"},children:x("webhookEndpoint.noAvailableEvents")}),y&&e.jsx(p,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"500px",width:"100%"},children:e.jsx(F,{size:20})}),z&&e.jsx(te,{severity:"error",children:x("webhookEndpoint.loadingError",{message:z?.message})})]})}),e.jsxs(De,{sx:{p:"8px 24px 24px"},children:[e.jsx(H,{onClick:I,children:x("common.cancel")}),e.jsx(H,{type:"submit",variant:"contained",color:"primary",children:x(i?"webhookEndpoint.updateWebhook":"webhookEndpoint.saveWebhook")})]})]})})}fe.propTypes={onSubmit:t.func.isRequired,id:t.string,url:t.string,description:t.string,enabledEvents:t.arrayOf(t.shape({type:t.string.isRequired,source:t.string.isRequired})),onClose:t.func};function be(i){switch(i){case"enabled":return"success";case"disabled":default:return"default"}}const rt=(i="en")=>i==="tw"?"zh":i;function U(i,u="YYYY-MM-DD HH:mm:ss",c="en"){return i?Ze(i).locale(rt(c)).format(u):"-"}function lt(i){return typeof i=="number"?!1:me(i)}function at(i){return i>=200&&i<300}function $({value:i,label:u,tip:c="",divider:b=!1}){const r=lt(i);return e.jsxs(e.Fragment,{children:[e.jsxs(R,{direction:"column",alignItems:"flex-start",children:[e.jsxs(C,{component:"div",variant:"body1",mb:1,color:"text.primary",sx:{fontWeight:500},children:[u,!!c&&e.jsx(A,{title:c,children:e.jsx(_,{fontSize:"small"})})]}),e.jsx(C,{component:"div",variant:"body1",color:r?"text.disabled":"text.secondary",sx:{width:"100%",minHeight:"24px"},children:r?"-":i})]}),b&&e.jsx(ce,{orientation:"vertical",flexItem:!0})]})}$.propTypes={label:t.oneOfType([t.string,t.node]).isRequired,value:t.oneOfType([t.string,t.node]).isRequired,tip:t.oneOfType([t.string,t.node]),divider:t.bool};function je({title:i,children:u=null,mb:c=1.5,mt:b=1.5}){return e.jsxs(R,{className:"section-header",direction:"row",sx:{justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:1,mb:c,mt:b,pb:1},children:[e.jsx(C,{variant:"h3",sx:{fontSize:{xs:"18px",md:"1.09375rem"}},component:"div",children:i}),u]})}je.propTypes={title:t.oneOfType([t.string,t.node]).isRequired,children:t.node,mb:t.number,mt:t.number};const ct={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4m-4 4a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"/>'},dt=i=>{const u={};return i.forEach(c=>{const b=new Date(c.createdAt).toLocaleDateString();u[b]||(u[b]=[]),u[b]?.push(c)}),u};function ye({eventId:i="",webhookEndpointId:u="",event:c=null}){const{api:b,ws:{useSubscription:r}}=K(),{t:w}=M(),{teamDid:x}=V(),{blocklet:j}=Ge(),{data:l,loadMore:f,loadingMore:g,loading:y,mutate:z}=Te(s=>{const k=s?Math.ceil(s.list.length/15)+1:1;return b.getWebhookAttempts({input:{teamDid:x,input:{eventId:i,webhookId:u},paging:{page:k,pageSize:15}}})},{reloadDeps:[i,u]}),T=l?.list||[],[n,a]=E.useState(null),[m,v]=E.useState(!1),S=dt(T);if(E.useEffect(()=>{!n&&l?.list.length&&a(l.list[0])},[l?.list.length,n]),r(xe.EVENTS.WEBHOOK_ATTEMPT,s=>{z(h=>{if(h.list.find(W=>W.id===s.id)){const W=h.list.map(P=>P.id===s.id?{...P,...s}:P);return{...h,list:W}}return s.endpoint=h.list[0]?.endpoint,s.event=h.list[0]?.event,{...h,list:[s,...h.list]}})},[]),y)return e.jsx(F,{});const D=l&&l.list.length<l.paging.total,I=async()=>{n&&(v(!0),await b.retryWebhookAttempt({input:{teamDid:x,eventId:n.event.id,webhookId:u,attemptId:n.id}}).finally(()=>{setTimeout(()=>{v(!1)},1e3)}))},O=s=>{if(s.responseBody&&s.responseBody?.sessionId&&s.responseBody?.projectId&&s.responseBody?.agentId){const h=j?.site?.domainAliases[0]?.value,k=(j.children||[]).find(P=>P?.meta?.name==="ai-studio"),W=ot(he(`https://${h}`,k?.mountPoint||"","projects",s.responseBody.projectId,"logs/main"),{sessionId:s.responseBody.sessionId,agentId:s.responseBody.agentId});return e.jsx(B,{sx:{fontSize:20},onClick:()=>window.open(W,"_blank"),children:e.jsx(p,{component:N,icon:Q})})}return null},o=s=>s.status==="pending"?e.jsx(Fe,{color:"warning"}):at(s.responseStatus)?e.jsx(He,{color:"success"}):e.jsx(Ne,{color:"error"}),d=n?.triggeredFrom&&(l?.list||[]).find(s=>s.id===n.triggeredFrom);return e.jsxs(pt,{container:!0,spacing:{xs:0,md:1},sx:{height:1},children:[e.jsx(ee,{size:{xs:12,md:4},sx:{height:1},children:me(Object.keys(S))?e.jsx(C,{sx:{color:"text.secondary"},children:w("webhookEndpoint.waitingForEvents")}):e.jsxs(e.Fragment,{children:[e.jsx(Z,{sx:{maxHeight:"calc(100% - 40px)",py:0,overflowY:"auto"},children:Object.entries(S).map(([s,h])=>e.jsxs(ae.Fragment,{children:[e.jsx(Le,{sx:{p:0},children:s}),h.map(k=>e.jsxs(G,{sx:{cursor:"pointer",px:1},onClick:()=>a(k),selected:n&&n?.id===k?.id,secondaryAction:e.jsx(C,{sx:{color:"text.secondary"},children:U(k.createdAt,"HH:mm:ss")}),children:[e.jsx(Me,{sx:{minWidth:0,mr:1.5},children:o(k)}),e.jsx(Be,{primary:e.jsx(C,{sx:{color:"text.primary"},children:k.event.type})})]},k.id))]},s))}),D&&e.jsx(p,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:1},children:e.jsx(H,{variant:"text",type:"button",color:"inherit",onClick:f,disabled:g,sx:{color:s=>s.palette.text.disabled},children:w(g?"webhookEndpoint.loadingMore":"webhookEndpoint.loadMore")})})]})}),e.jsxs(ee,{size:{xs:12,md:8},sx:{height:1},children:[n&&e.jsxs(R,{direction:"column",spacing:2,sx:{height:1,overflow:"auto",pl:{xs:0,md:1},mt:{xs:2,md:0},borderLeft:{xs:"none"}},children:[e.jsxs(p,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e.jsxs(p,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(C,{variant:"h4",children:w(`common.${n.status}`)}),e.jsx(p,{children:O(n)})]}),e.jsxs(p,{sx:{display:"flex",alignItems:"center",gap:1},children:[d&&e.jsx(A,{placement:"left",title:e.jsxs(R,{onClick:()=>a(d),sx:{gap:1,cursor:"pointer",".did-address-text":{color:"common.white"}},children:[e.jsx(de,{showDid:!0,did:n.triggeredBy,cardType:ue.Detailed,infoType:pe.Minimal,sx:{border:0,padding:0,minWidth:0,".MuiTypography-root":{color:"common.white",fontWeight:400}}}),e.jsx(ce,{}),e.jsxs(p,{sx:{display:"flex",flexDirection:"column"},children:[e.jsx(C,{variant:"body2",sx:{color:"primary.main"},children:w("webhookEndpoint.triggeredFrom")}),e.jsxs(p,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(C,{variant:"body2",children:n.id}),e.jsx(B,{onClick:()=>a(d),children:e.jsx(p,{component:N,icon:Q,sx:{fontSize:16,color:"common.white"}})})]})]})]}),slotProps:{tooltip:{sx:{maxWidth:400}}},children:e.jsx(B,{onClick:()=>a(d),children:e.jsx(p,{component:N,icon:Q,sx:{fontSize:16}})})}),e.jsxs(H,{variant:"outlined",color:"primary",size:"small",onClick:I,disabled:m,children:[e.jsx(p,{component:N,icon:ct,sx:{fontSize:16,animation:m?"spin 1s linear infinite":"none",mr:.5}}),w("notification.resend")]})]})]}),e.jsxs(p,{children:[e.jsxs(C,{variant:"h6",children:[w("webhookEndpoint.response")," (",n.responseStatus,")"]}),e.jsx(Y,{language:"json",children:JSON.stringify(n.responseBody,null,2)})]}),e.jsxs(p,{children:[e.jsx(R,{direction:"row",spacing:1,sx:{alignItems:"center"},children:e.jsx(C,{variant:"h6",children:w("webhookEndpoint.request")})}),e.jsx(Y,{language:"json",sx:{margin:0},children:JSON.stringify(n.event,null,2)})]})]}),l?.list.length===0&&c&&e.jsxs(p,{children:[e.jsx(R,{direction:"row",spacing:1,sx:{alignItems:"center"},children:e.jsx(C,{variant:"h6",children:w("webhookEndpoint.eventData")})}),e.jsx(Y,{language:"json",sx:{margin:0},children:JSON.stringify(c.data,null,2)})]})]})]})}ye.propTypes={eventId:t.string,webhookEndpointId:t.string,event:t.shape({type:t.string,data:t.object,request:t.object,requestInfo:t.object})};const pt=oe(ee)`
|
|
2
2
|
@keyframes spin {
|
|
3
3
|
to {
|
|
4
4
|
transform: rotate(360deg);
|