mobx-view-model-devtools 0.0.20 → 0.0.22
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/auto.global.js +2 -37515
- package/index.cjs +2 -2
- package/index.d.ts +77 -47
- package/index.js +2577 -1342
- package/package.json +6 -4
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var t=document.createElement("style");t.appendChild(document.createTextNode(".root_Xsw1F{display:contents}.root_Xsw1F *{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:14px}.vmButton_Xr1Q6{position:fixed;z-index:999999;width:36px;height:36px;cursor:pointer;border-radius:8px;outline:0;transition:all .15s ease-in-out}.vmButton_Xr1Q6[data-position=top-right],.vmButton_Xr1Q6[data-position=undefined]{top:12px;right:12px}.vmButton_Xr1Q6[data-position=top-right].opened_gewqL,.vmButton_Xr1Q6[data-position=undefined].opened_gewqL{top:-40px}.vmButton_Xr1Q6[data-position=top-left]{top:12px;left:12px}.vmButton_Xr1Q6[data-position=top-left].opened_gewqL{top:-40px}.vmButton_Xr1Q6[data-position=bottom-left]{bottom:12px;left:12px}.vmButton_Xr1Q6[data-position=bottom-left].opened_gewqL{bottom:-40px}.vmButton_Xr1Q6[data-position=bottom-right]{bottom:12px;right:12px}.vmButton_Xr1Q6[data-position=bottom-right].opened_gewqL{bottom:-40px}.vmButton_Xr1Q6>img{pointer-events:none;position:absolute;inset:0;border-radius:8px}.vmButton_Xr1Q6>div{transition:all .15s ease-in-out;position:absolute;inset:0;border-radius:8px;border:2px solid #00000057}.vmButton_Xr1Q6>span{left:-4px;top:-4px;pointer-events:none;position:absolute;display:flex;border-radius:8px;background:#005c26cf;padding:2px;font-weight:600;font-size:12px;line-height:12px;color:#2aff0a}.vmButton_Xr1Q6.opened_gewqL{pointer-events:none}.vmButton_Xr1Q6:not(.isConnected_tjs3F){filter:grayscale(1)}.closePopupButton_-08HG{width:28px;padding:6px}.hierarchyButton_h3FD7{width:18px;height:18px;padding:2px;border-radius:6px}.hierarchyButton_h3FD7.active_4JTx5{background:#f0f0f01f}.vmPopup_Q4l4j{position:fixed;z-index:999999;width:520px;border-radius:8px;height:calc(100vh - 24px);width:calc(100vw - 34px);max-width:520px}.vmPopup_Q4l4j[data-position=top-right],.vmPopup_Q4l4j[data-position=undefined]{top:12px;right:12px}.vmPopup_Q4l4j[data-position=top-left]{top:12px;left:12px}.vmPopup_Q4l4j[data-position=bottom-left]{bottom:12px;left:12px}.vmPopup_Q4l4j[data-position=bottom-right]{bottom:12px;right:12px}.treeItemHeader_9gR6Q{display:flex;align-items:center;gap:4px;margin:auto 0;cursor:pointer;background:#1e1e1e;z-index:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.treeItemLabel_eiMgP{padding:0 4px;border-radius:4px}.treeItemMetaText_cmfX0{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.treeItem_sRXPA{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:pre;background:#1e1e1e;height:22px;display:flex;flex-direction:row;align-items:center;padding-left:calc(0px + (var(--level) * 20px));position:sticky;top:-8px;z-index:1}.treeItem_sRXPA:not([data-fitted=true])>header{opacity:.6}.vmTreeItem_t-7jc .treeItemLabel_eiMgP{background:#0f6013}.vmTreeItem_t-7jc .treeItemMetaText_cmfX0{color:#5ab65e}.extrasItem_MI9Fa .treeItemLabel_eiMgP{background:#6b6902}.expandButton_EObqt{color:#a0a0a0;opacity:1!important;width:16px;height:16px;font-weight:700;cursor:pointer}.expandButton_EObqt.expanded_uFpb7{color:#b8b8b8;transform:rotate(90deg)}.expandButton_EObqt.disabled_IDojS{opacity:.35!important}.iconToggleButton_R48wm{display:flex;align-items:center;gap:2px;position:relative;height:20px;outline:none}.activePosition_IXsRn{position:absolute;height:16px;width:16px;padding:1px;box-sizing:content-box;background:#515151;border-radius:4px;transition:all 149ms ease;transform:translate(calc(20px * var(--index)))}.option_a5IcR{padding:1px;z-index:1;width:18px;height:18px;display:flex;align-items:center;justify-content:center}.option_a5IcR>svg{width:14px;height:14px}.property_tyrFk{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:pre;background:#1e1e1e;height:22px;display:flex;flex-direction:row;align-items:center;position:relative;color:#616161;padding-left:calc(28px + (var(--level) * 15px))}.property_tyrFk.expandable_ZtNTw{cursor:pointer}.property_tyrFk[data-fitted=false]{opacity:.5}.property_tyrFk.instance_aPKFv{--value-color: rgb(186 130 190)}.property_tyrFk.primitive_mOPtu.boolean_H-c-u,.property_tyrFk.primitive_mOPtu.number_Mk-lR,.property_tyrFk.primitive_mOPtu.object_rbtD2,.property_tyrFk.primitive_mOPtu.undefined_xHzJR,.property_tyrFk.primitive_mOPtu.bigint_vEvWZ,.property_tyrFk.primitive_mOPtu.symbol_izwyn{--value-color: rgb(89, 153, 205)}.primitive_mOPtu.string_qjuUu{--value-color: #af7249}.propertyName_gpj0H{color:#ccc}.propertyMeta_xSfkm{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.propertyValue_QT-FH{color:var(--value-color, #616161);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.propertyValue_QT-FH:has(+.propertyName_gpj0H){margin-right:4px}.vmContent_TIK57{color:#ccc;background:#1e1e1e;overflow:auto;display:flex;flex-direction:column}.vmContentHeader_M1JNM{display:flex;justify-content:space-between;align-items:center;height:32px;padding-left:8px;font-weight:600}.vmContentHeaderLogo_FRJDO{width:16px;margin-right:6px}.vmContentHeaderTitle_lYmde{font-size:16px;margin-right:auto}.vmContentControlPanel_CgUN9{padding:0 8px;width:100%;background:#1e1e1e;display:flex;flex-direction:row;gap:4px}.vmContentControlPanelActions_lONbA{display:flex;flex-direction:row;align-items:center}.hiearchyToggleButton_0FTG-{display:flex}.vmContentHeaderBaseActions_qc7CI{display:flex;flex-direction:row;gap:4px;height:16px;align-items:center;margin-left:6px;margin-right:auto}.vmContentInput_29GM1{display:flex;position:relative;flex:1}.vmContentInput_29GM1>svg{position:absolute;width:16px;inset:50% 0;transform:translate(6px,-50%);pointer-events:none;opacity:.7}.vmContentInput_29GM1>input{background:#343434;border-radius:4px;outline:0;width:100%;padding:3px 26px;font-size:14px;text-overflow:ellipsis}.vmContentInput_29GM1>button{position:absolute;right:6px;width:16px;transform:translate(4px,-50%);top:50%;opacity:.6;display:none}.vmContentInput_29GM1.filled_6JZa0>svg{opacity:.9}.vmContentInput_29GM1.filled_6JZa0>button{display:block}.vmContentTree_BETR6{display:flex;flex-direction:column;padding:8px;overflow:auto;scrollbar-width:thin;scrollbar-color:#81818170 #1e1e1e}.vmContentTree_BETR6:hover{scrollbar-color:#818181 #1e1e1e}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var t=document.createElement("style");t.appendChild(document.createTextNode('.vmButton_esipO{position:fixed;z-index:999999;width:36px;height:36px;border-radius:8px;transition:all .15s ease-in-out;cursor:pointer;-webkit-user-select:none;user-select:none}.vmButton_esipO.dragging_kUMCE{transition:none;cursor:grabbing;opacity:.8;z-index:1000}.vmButton_esipO.opened_NYAFW{opacity:0!important;pointer-events:none}.vmButton_esipO[data-position=top-right]{top:12px;right:12px}.vmButton_esipO[data-position=top-left]{top:12px;left:12px}.vmButton_esipO[data-position=bottom-left]{bottom:12px;left:12px}.vmButton_esipO[data-position=bottom-right]{bottom:12px;right:12px}.vmButton_esipO>img{pointer-events:none;position:absolute;inset:0;border-radius:8px}.vmButton_esipO>div{transition:all .15s ease-in-out;position:absolute;inset:0;border-radius:8px;border:2px solid #00000057}.vmButton_esipO>span{left:-4px;top:-4px;pointer-events:none;position:absolute;display:flex;border-radius:8px;background:#005c26cf;padding:2px;font-weight:600;font-size:12px;line-height:12px;color:#2aff0a}.vmButton_esipO:not(.isConnected_eObxX){filter:grayscale(1)}.vmPopup_0hkGL{position:fixed!important;z-index:999999;width:520px;border-radius:8px;height:calc(100vh - 24px);width:calc(100vw - 34px);max-width:520px;box-shadow:0 5px 20px #0006}.vmPopup_0hkGL[data-position=top-right]{top:12px;right:12px}.vmPopup_0hkGL[data-position=top-left]{top:12px;left:12px}.vmPopup_0hkGL[data-position=bottom-left]{bottom:12px;left:12px}.vmPopup_0hkGL[data-position=bottom-right]{bottom:12px;right:12px}.closePopupButton_igv9j{width:28px;height:28px;padding:6px;border:0;background:transparent;color:var(--vmd-base-color)}.iconToggleButton_R48wm{display:flex;align-items:center;gap:2px;position:relative;height:20px;outline:none}.activePosition_IXsRn{position:absolute;height:16px;width:16px;padding:1px;box-sizing:content-box!important;background:var(--vmd-control-active-bg);-webkit-backdrop-filter:blur(var(--vmd-base-blur));backdrop-filter:blur(var(--vmd-base-blur));border-radius:4px;transition:all 149ms ease;transform:translate(calc(20px * var(--index)))}.option_a5IcR{padding:1px;z-index:1;width:18px;height:18px;display:flex;align-items:center;justify-content:center;transition:all 149ms ease;color:var(--vmd-control-inactive-color)}.option_a5IcR.active_6QS-2{color:var(--vmd-control-active-color)}.option_a5IcR>svg{width:14px;height:14px}.property_Oy4bS{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:pre;background:var(--vmd-content-bg);height:22px;display:flex;flex-direction:row;align-items:center;position:relative;color:var(--vmd-property-meta-color);padding-left:calc(0px + 28px + (var(--level) * 15px))}.property_Oy4bS.expandable_usEY-{cursor:pointer}.property_Oy4bS[data-fitted=false]{opacity:.5}.property_Oy4bS.instance_g6xOw{--value-color: rgb(190 113 195)}.property_Oy4bS.primitive_v003s.boolean_INujc,.property_Oy4bS.primitive_v003s.number_7K-jw,.property_Oy4bS.primitive_v003s.object_3K21J,.property_Oy4bS.primitive_v003s.bigint_NCBnp,.property_Oy4bS.primitive_v003s.symbol_Nk-vG{--value-color: rgb(89, 153, 205)}.property_Oy4bS.primitive_v003s.undefined_32Xx8,.property_Oy4bS.primitive_v003s.null_jbJLZ{--value-color: #499098}.primitive_v003s.string_DCKmP{--value-color: #af7249}.propertyName_Jbwvb{color:#ccc}.propertyMeta_D04Er{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.propertyValue_bht-2{color:var(--value-color, var(--vmd-property-meta-color));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.propertyValue_bht-2:has(+.propertyName_Jbwvb){margin-right:4px}.expandButton_B24E3{color:#a0a0a0;opacity:1!important;width:16px;height:16px;font-weight:700;cursor:pointer}.expandButton_B24E3.expanded_8-pD6{color:#b8b8b8;transform:rotate(90deg)}.expandButton_B24E3.disabled_MBq1Q{opacity:.35!important}.vmContent_TIK57[data-simplebar]{position:relative;flex-wrap:wrap;justify-content:flex-start;align-content:flex-start;align-items:flex-start;color:var(--vmd-base-color);background:var(--vmd-bg);-webkit-backdrop-filter:blur(var(--vmd-base-blur));backdrop-filter:blur(var(--vmd-base-blur));display:flex;flex-direction:column;overflow:auto;overflow-y:auto;scrollbar-width:thin;overflow-anchor:none}.vmContent_TIK57[data-simplebar] .simplebar-wrapper{overflow:hidden;width:inherit;height:inherit;max-width:inherit;max-height:inherit}.vmContent_TIK57[data-simplebar] .simplebar-mask{direction:inherit;position:absolute;overflow:hidden;padding:0;margin:0;inset:0;width:auto!important;height:auto!important;z-index:0}.vmContent_TIK57[data-simplebar] .simplebar-offset{direction:inherit!important;box-sizing:inherit!important;resize:none!important;position:absolute;inset:0;padding:0;margin:0;-webkit-overflow-scrolling:touch}.vmContent_TIK57[data-simplebar] .simplebar-content-wrapper{direction:inherit;box-sizing:border-box!important;position:relative;display:block;height:100%;width:auto;max-width:100%;max-height:100%;overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.vmContent_TIK57[data-simplebar] .simplebar-content-wrapper::-webkit-scrollbar,.vmContent_TIK57[data-simplebar] .simplebar-hide-scrollbar::-webkit-scrollbar{display:none;width:0;height:0}.vmContent_TIK57[data-simplebar] .simplebar-content:after,.vmContent_TIK57[data-simplebar] .simplebar-content:before{content:" ";display:table}.vmContent_TIK57[data-simplebar] .simplebar-placeholder{max-height:100%;max-width:100%;width:100%;pointer-events:none}.vmContent_TIK57[data-simplebar] .simplebar-height-auto-observer-wrapper{box-sizing:inherit!important;height:100%;width:100%;max-width:1px;position:relative;float:left;max-height:1px;overflow:hidden;z-index:-1;padding:0;margin:0;pointer-events:none;flex-grow:inherit;flex-shrink:0;flex-basis:0}.vmContent_TIK57[data-simplebar] .simplebar-height-auto-observer{box-sizing:inherit;display:block;opacity:0;position:absolute;top:0;left:0;height:1000%;width:1000%;min-height:1px;min-width:1px;overflow:hidden;pointer-events:none;z-index:-1}.vmContent_TIK57[data-simplebar] .simplebar-track{z-index:1;position:absolute;right:0;bottom:0;pointer-events:none;overflow:hidden}.vmContent_TIK57[data-simplebar].simplebar-dragging,.vmContent_TIK57[data-simplebar].simplebar-dragging .simplebar-content{pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vmContent_TIK57[data-simplebar].simplebar-dragging .simplebar-track{pointer-events:all}.vmContent_TIK57[data-simplebar] .simplebar-scrollbar{position:absolute;left:0;right:0;min-height:10px}.vmContent_TIK57[data-simplebar] .simplebar-scrollbar:before{position:absolute;content:"";background:var(--vmd-scrollbar-bg-base);border-radius:7px;left:2px;right:2px;opacity:0;transition:opacity .2s .5s linear}.vmContent_TIK57[data-simplebar] .simplebar-scrollbar.simplebar-visible:before{opacity:.5;transition-delay:0s;transition-duration:0s}.vmContent_TIK57[data-simplebar] .simplebar-track.simplebar-vertical{top:0;width:var(--vmd-scrollbar-track-size)}.vmContent_TIK57[data-simplebar] .simplebar-scrollbar:before{inset:2px}.vmContent_TIK57[data-simplebar] .simplebar-track.simplebar-horizontal{left:0;height:var(--vmd-scrollbar-track-size)}.vmContent_TIK57[data-simplebar] .simplebar-track.simplebar-horizontal .simplebar-scrollbar{inset:0 auto 0 0;min-height:0;min-width:10px;width:auto}.vmContent_TIK57[data-simplebar] .simplebar-dummy-scrollbar-size{direction:rtl;position:fixed;opacity:0;visibility:hidden;height:500px;width:500px;overflow-y:hidden;overflow-x:scroll;-ms-overflow-style:scrollbar!important}.vmContent_TIK57[data-simplebar] .simplebar-dummy-scrollbar-size>div{width:200%;height:200%;margin:10px 0}.vmContent_TIK57[data-simplebar] .simplebar-hide-scrollbar{position:fixed;left:0;visibility:hidden;overflow-y:scroll;scrollbar-width:none;-ms-overflow-style:none}.vmContentHeader_M1JNM{display:flex;flex-direction:column;height:var(--vmd-header-height);flex:none;padding:0 8px;position:sticky;top:0;z-index:1}.vmContentHeaderLogo_FRJDO{width:16px;margin-right:6px}.vmContentHeaderTitle_lYmde{display:flex;justify-content:space-between;align-items:center;flex:none;font-weight:600;z-index:1}.vmContentHeaderTitleText_RlIFH{font-size:16px;margin-right:auto}.vmContentControlPanel_CgUN9{width:100%;height:var(--vmd-control-panel-height);padding-bottom:4px;flex:none;display:flex;flex-direction:row;z-index:1;gap:4px}.vmContentControlPanelActions_lONbA{display:flex;flex-direction:row;align-items:center}.hiearchyToggleButton_0FTG-{display:flex}.vmContentInput_29GM1{display:flex;position:relative;flex:1}.vmContentInput_29GM1>svg{position:absolute;width:16px;inset:50% 0;transform:translate(6px,-50%);pointer-events:none;opacity:.7}.vmContentInput_29GM1>input{background:var(--vmd-control-bg);border:1px solid var(--vmd-control-border);color:var(--vmd-control-active-text-input-color);border-radius:4px;outline:0;width:100%;padding:3px 26px;font-size:14px;text-overflow:ellipsis}.vmContentInput_29GM1>button{position:absolute;right:6px;width:16px;transform:translate(4px,-50%);top:50%;opacity:.6;display:none}.vmContentInput_29GM1.filled_6JZa0>svg{opacity:.9}.vmContentInput_29GM1.filled_6JZa0>button{display:block}.vmContentVirtualized_lia62{flex:1}.vmContentVirtualized_lia62>div>div{height:22px}.gradientBlur_-y-re{position:absolute;top:0;left:0;width:100%;height:calc(100% + 12px);pointer-events:none;background:linear-gradient(to bottom,var(--vmd-overlay-bg) 0%,rgba(0,0,0,0) 100%)}.gradientBlur_-y-re:before{content:"";position:absolute;inset:0;background:transparent;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);-webkit-mask:linear-gradient(to bottom,var(--vmd-overlay-bg) 50%,rgba(0,0,0,0) 100%);mask:linear-gradient(to bottom,var(--vmd-overlay-bg) 50%,rgba(0,0,0,0) 100%)}:root{--vmd-base-blur: 2px;--vmd-bg: #0f111cdb;--vmd-overlay-bg: #0e1227bd;--vmd-base-color: #ccc;--vmd-control-active-bg: #e6e6e682;--vmd-control-active-color: #181818;--vmd-control-active-text-input-color: var(--vmd-base-color);--vmd-control-inactive-color: #8b8b8b;--vmd-control-border: #5b5468a6;--vmd-control-bg: transparent;--vmd-bg-transparent: #1f1c2600;--vmd-content-bg: transparent;--vmd-scrollbar-track-size: 8px;--vmd-scrollbar-bg-base: #81818170;--vmd-scrollbar-bg-active: #818181;--vmd-property-meta-color: #616161;--vmd-primary-bg: #0f6013;--vmd-primary-color: #5ab65e;--vmd-secondary-bg: #6b6902;--vmd-header-height: 60px}.root_Xsw1F{display:contents;box-sizing:border-box}.root_Xsw1F *{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:14px;box-sizing:border-box}.root_Xsw1F button{outline:none;background:transparent;border:0;cursor:pointer;margin:0;padding-block:0;padding-inline:0}.hierarchyButton_h3FD7{width:18px;height:18px;padding:2px;border-radius:6px}.hierarchyButton_h3FD7.active_4JTx5{background:#f0f0f01f}.treeItemHeader_9gR6Q{display:flex;align-items:center;gap:4px;margin:auto 0;cursor:pointer;z-index:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.treeItemLabel_eiMgP{padding:0 4px;border-radius:4px}.treeItemMetaText_cmfX0{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.treeItem_sRXPA{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:pre;height:22px;display:flex;flex-direction:row;align-items:center;padding-left:calc(8px + (var(--level) * 20px));position:sticky;top:calc(var(--vmd-header-height) + var(--vmd-control-panel-height));z-index:1}.treeItem_sRXPA:not([data-fitted=true])>header{opacity:.6}.vmTreeItem_t-7jc .treeItemLabel_eiMgP{background:var(--vmd-primary-bg)}.vmTreeItem_t-7jc .treeItemMetaText_cmfX0{color:var(--vmd-primary-color)}.extraTreeItem_z3KA1 .treeItemLabel_eiMgP{background:var(--vmd-secondary-bg)}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();
|
|
2
2
|
function getDefaultExportFromCjs(x2) {
|
|
3
3
|
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
4
4
|
}
|
|
@@ -386,7 +386,7 @@ function requireReact_development() {
|
|
|
386
386
|
}
|
|
387
387
|
return null;
|
|
388
388
|
}
|
|
389
|
-
var
|
|
389
|
+
var hasOwnProperty2 = Object.prototype.hasOwnProperty;
|
|
390
390
|
var RESERVED_PROPS = {
|
|
391
391
|
key: true,
|
|
392
392
|
ref: true,
|
|
@@ -399,7 +399,7 @@ function requireReact_development() {
|
|
|
399
399
|
}
|
|
400
400
|
function hasValidRef(config) {
|
|
401
401
|
{
|
|
402
|
-
if (
|
|
402
|
+
if (hasOwnProperty2.call(config, "ref")) {
|
|
403
403
|
var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
|
|
404
404
|
if (getter && getter.isReactWarning) {
|
|
405
405
|
return false;
|
|
@@ -410,7 +410,7 @@ function requireReact_development() {
|
|
|
410
410
|
}
|
|
411
411
|
function hasValidKey(config) {
|
|
412
412
|
{
|
|
413
|
-
if (
|
|
413
|
+
if (hasOwnProperty2.call(config, "key")) {
|
|
414
414
|
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
415
415
|
if (getter && getter.isReactWarning) {
|
|
416
416
|
return false;
|
|
@@ -522,7 +522,7 @@ function requireReact_development() {
|
|
|
522
522
|
self2 = config.__self === void 0 ? null : config.__self;
|
|
523
523
|
source = config.__source === void 0 ? null : config.__source;
|
|
524
524
|
for (propName in config) {
|
|
525
|
-
if (
|
|
525
|
+
if (hasOwnProperty2.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
526
526
|
props[propName] = config[propName];
|
|
527
527
|
}
|
|
528
528
|
}
|
|
@@ -594,7 +594,7 @@ function requireReact_development() {
|
|
|
594
594
|
defaultProps = element.type.defaultProps;
|
|
595
595
|
}
|
|
596
596
|
for (propName in config) {
|
|
597
|
-
if (
|
|
597
|
+
if (hasOwnProperty2.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
598
598
|
if (config[propName] === void 0 && defaultProps !== void 0) {
|
|
599
599
|
props[propName] = defaultProps[propName];
|
|
600
600
|
} else {
|
|
@@ -1394,7 +1394,7 @@ function requireReact_development() {
|
|
|
1394
1394
|
}
|
|
1395
1395
|
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
|
1396
1396
|
{
|
|
1397
|
-
var has = Function.call.bind(
|
|
1397
|
+
var has = Function.call.bind(hasOwnProperty2);
|
|
1398
1398
|
for (var typeSpecName in typeSpecs) {
|
|
1399
1399
|
if (has(typeSpecs, typeSpecName)) {
|
|
1400
1400
|
var error$1 = void 0;
|
|
@@ -2314,7 +2314,7 @@ function requireReactJsxRuntime_development() {
|
|
|
2314
2314
|
}
|
|
2315
2315
|
return "";
|
|
2316
2316
|
}
|
|
2317
|
-
var
|
|
2317
|
+
var hasOwnProperty2 = Object.prototype.hasOwnProperty;
|
|
2318
2318
|
var loggedTypeFailures = {};
|
|
2319
2319
|
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
2320
2320
|
function setCurrentlyValidatingElement(element) {
|
|
@@ -2330,7 +2330,7 @@ function requireReactJsxRuntime_development() {
|
|
|
2330
2330
|
}
|
|
2331
2331
|
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
|
2332
2332
|
{
|
|
2333
|
-
var has = Function.call.bind(
|
|
2333
|
+
var has = Function.call.bind(hasOwnProperty2);
|
|
2334
2334
|
for (var typeSpecName in typeSpecs) {
|
|
2335
2335
|
if (has(typeSpecs, typeSpecName)) {
|
|
2336
2336
|
var error$1 = void 0;
|
|
@@ -2402,7 +2402,7 @@ function requireReactJsxRuntime_development() {
|
|
|
2402
2402
|
var specialPropRefWarningShown;
|
|
2403
2403
|
function hasValidRef(config) {
|
|
2404
2404
|
{
|
|
2405
|
-
if (
|
|
2405
|
+
if (hasOwnProperty2.call(config, "ref")) {
|
|
2406
2406
|
var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
|
|
2407
2407
|
if (getter && getter.isReactWarning) {
|
|
2408
2408
|
return false;
|
|
@@ -2413,7 +2413,7 @@ function requireReactJsxRuntime_development() {
|
|
|
2413
2413
|
}
|
|
2414
2414
|
function hasValidKey(config) {
|
|
2415
2415
|
{
|
|
2416
|
-
if (
|
|
2416
|
+
if (hasOwnProperty2.call(config, "key")) {
|
|
2417
2417
|
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
2418
2418
|
if (getter && getter.isReactWarning) {
|
|
2419
2419
|
return false;
|
|
@@ -2519,7 +2519,7 @@ function requireReactJsxRuntime_development() {
|
|
|
2519
2519
|
warnIfStringRefCannotBeAutoConverted(config, self2);
|
|
2520
2520
|
}
|
|
2521
2521
|
for (propName in config) {
|
|
2522
|
-
if (
|
|
2522
|
+
if (hasOwnProperty2.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
2523
2523
|
props[propName] = config[propName];
|
|
2524
2524
|
}
|
|
2525
2525
|
}
|
|
@@ -2746,7 +2746,7 @@ function requireReactJsxRuntime_development() {
|
|
|
2746
2746
|
}
|
|
2747
2747
|
}
|
|
2748
2748
|
{
|
|
2749
|
-
if (
|
|
2749
|
+
if (hasOwnProperty2.call(props, "key")) {
|
|
2750
2750
|
var componentName = getComponentNameFromType(type);
|
|
2751
2751
|
var keys = Object.keys(props).filter(function(k2) {
|
|
2752
2752
|
return k2 !== "key";
|
|
@@ -2947,11 +2947,11 @@ function isStringish(value) {
|
|
|
2947
2947
|
}
|
|
2948
2948
|
return false;
|
|
2949
2949
|
}
|
|
2950
|
-
function isObject$
|
|
2950
|
+
function isObject$2(value) {
|
|
2951
2951
|
return value !== null && typeof value === "object";
|
|
2952
2952
|
}
|
|
2953
2953
|
function isPlainObject(value) {
|
|
2954
|
-
if (!isObject$
|
|
2954
|
+
if (!isObject$2(value)) {
|
|
2955
2955
|
return false;
|
|
2956
2956
|
}
|
|
2957
2957
|
var proto = Object.getPrototypeOf(value);
|
|
@@ -2991,7 +2991,7 @@ function createInstanceofPredicate(name, theClass) {
|
|
|
2991
2991
|
var propName = "isMobX" + name;
|
|
2992
2992
|
theClass.prototype[propName] = true;
|
|
2993
2993
|
return function(x2) {
|
|
2994
|
-
return isObject$
|
|
2994
|
+
return isObject$2(x2) && x2[propName] === true;
|
|
2995
2995
|
};
|
|
2996
2996
|
}
|
|
2997
2997
|
function isES6Map(thing) {
|
|
@@ -2999,8 +2999,8 @@ function isES6Map(thing) {
|
|
|
2999
2999
|
}
|
|
3000
3000
|
function isPlainES6Map(thing) {
|
|
3001
3001
|
var mapProto = Object.getPrototypeOf(thing);
|
|
3002
|
-
var
|
|
3003
|
-
var nullProto = Object.getPrototypeOf(
|
|
3002
|
+
var objectProto2 = Object.getPrototypeOf(mapProto);
|
|
3003
|
+
var nullProto = Object.getPrototypeOf(objectProto2);
|
|
3004
3004
|
return nullProto === null;
|
|
3005
3005
|
}
|
|
3006
3006
|
function isES6Set(thing) {
|
|
@@ -5987,7 +5987,7 @@ function reduceLikeFunc(funcName) {
|
|
|
5987
5987
|
}
|
|
5988
5988
|
var isObservableArrayAdministration = /* @__PURE__ */ createInstanceofPredicate("ObservableArrayAdministration", ObservableArrayAdministration);
|
|
5989
5989
|
function isObservableArray(thing) {
|
|
5990
|
-
return isObject$
|
|
5990
|
+
return isObject$2(thing) && isObservableArrayAdministration(thing[$mobx]);
|
|
5991
5991
|
}
|
|
5992
5992
|
var ObservableMapMarker = {};
|
|
5993
5993
|
var ADD = "add";
|
|
@@ -7080,7 +7080,7 @@ function getCachedObservablePropDescriptor(key) {
|
|
|
7080
7080
|
});
|
|
7081
7081
|
}
|
|
7082
7082
|
function isObservableObject(thing) {
|
|
7083
|
-
if (isObject$
|
|
7083
|
+
if (isObject$2(thing)) {
|
|
7084
7084
|
return isObservableObjectAdministration(thing[$mobx]);
|
|
7085
7085
|
}
|
|
7086
7086
|
return false;
|
|
@@ -8043,8 +8043,8 @@ function requireReactDom_development() {
|
|
|
8043
8043
|
allNativeEvents.add(dependencies[i]);
|
|
8044
8044
|
}
|
|
8045
8045
|
}
|
|
8046
|
-
var
|
|
8047
|
-
var
|
|
8046
|
+
var canUseDOM2 = !!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined");
|
|
8047
|
+
var hasOwnProperty2 = Object.prototype.hasOwnProperty;
|
|
8048
8048
|
function typeName(value) {
|
|
8049
8049
|
{
|
|
8050
8050
|
var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
|
|
@@ -8126,10 +8126,10 @@ function requireReactDom_development() {
|
|
|
8126
8126
|
var illegalAttributeNameCache = {};
|
|
8127
8127
|
var validatedAttributeNameCache = {};
|
|
8128
8128
|
function isAttributeNameSafe(attributeName) {
|
|
8129
|
-
if (
|
|
8129
|
+
if (hasOwnProperty2.call(validatedAttributeNameCache, attributeName)) {
|
|
8130
8130
|
return true;
|
|
8131
8131
|
}
|
|
8132
|
-
if (
|
|
8132
|
+
if (hasOwnProperty2.call(illegalAttributeNameCache, attributeName)) {
|
|
8133
8133
|
return false;
|
|
8134
8134
|
}
|
|
8135
8135
|
if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
|
|
@@ -10743,7 +10743,7 @@ function requireReactDom_development() {
|
|
|
10743
10743
|
var rARIACamel = new RegExp("^(aria)[A-Z][" + ATTRIBUTE_NAME_CHAR + "]*$");
|
|
10744
10744
|
function validateProperty(tagName, name) {
|
|
10745
10745
|
{
|
|
10746
|
-
if (
|
|
10746
|
+
if (hasOwnProperty2.call(warnedProperties, name) && warnedProperties[name]) {
|
|
10747
10747
|
return true;
|
|
10748
10748
|
}
|
|
10749
10749
|
if (rARIACamel.test(name)) {
|
|
@@ -10826,7 +10826,7 @@ function requireReactDom_development() {
|
|
|
10826
10826
|
var rARIA$1 = new RegExp("^(aria)-[" + ATTRIBUTE_NAME_CHAR + "]*$");
|
|
10827
10827
|
var rARIACamel$1 = new RegExp("^(aria)[A-Z][" + ATTRIBUTE_NAME_CHAR + "]*$");
|
|
10828
10828
|
validateProperty$1 = function(tagName, name, value, eventRegistry) {
|
|
10829
|
-
if (
|
|
10829
|
+
if (hasOwnProperty2.call(warnedProperties$1, name) && warnedProperties$1[name]) {
|
|
10830
10830
|
return true;
|
|
10831
10831
|
}
|
|
10832
10832
|
var lowerCasedName = name.toLowerCase();
|
|
@@ -11093,7 +11093,7 @@ function requireReactDom_development() {
|
|
|
11093
11093
|
return listener;
|
|
11094
11094
|
}
|
|
11095
11095
|
var passiveBrowserEventsSupported = false;
|
|
11096
|
-
if (
|
|
11096
|
+
if (canUseDOM2) {
|
|
11097
11097
|
try {
|
|
11098
11098
|
var options = {};
|
|
11099
11099
|
Object.defineProperty(options, "passive", {
|
|
@@ -11555,7 +11555,7 @@ function requireReactDom_development() {
|
|
|
11555
11555
|
var cancelCallback = Scheduler.unstable_cancelCallback;
|
|
11556
11556
|
var shouldYield = Scheduler.unstable_shouldYield;
|
|
11557
11557
|
var requestPaint = Scheduler.unstable_requestPaint;
|
|
11558
|
-
var
|
|
11558
|
+
var now2 = Scheduler.unstable_now;
|
|
11559
11559
|
var getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel;
|
|
11560
11560
|
var ImmediatePriority = Scheduler.unstable_ImmediatePriority;
|
|
11561
11561
|
var UserBlockingPriority = Scheduler.unstable_UserBlockingPriority;
|
|
@@ -13530,13 +13530,13 @@ function requireReactDom_development() {
|
|
|
13530
13530
|
var SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface);
|
|
13531
13531
|
var END_KEYCODES = [9, 13, 27, 32];
|
|
13532
13532
|
var START_KEYCODE = 229;
|
|
13533
|
-
var canUseCompositionEvent =
|
|
13533
|
+
var canUseCompositionEvent = canUseDOM2 && "CompositionEvent" in window;
|
|
13534
13534
|
var documentMode = null;
|
|
13535
|
-
if (
|
|
13535
|
+
if (canUseDOM2 && "documentMode" in document) {
|
|
13536
13536
|
documentMode = document.documentMode;
|
|
13537
13537
|
}
|
|
13538
|
-
var canUseTextInputEvent =
|
|
13539
|
-
var useFallbackCompositionData =
|
|
13538
|
+
var canUseTextInputEvent = canUseDOM2 && "TextEvent" in window && !documentMode;
|
|
13539
|
+
var useFallbackCompositionData = canUseDOM2 && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
|
|
13540
13540
|
var SPACEBAR_CODE = 32;
|
|
13541
13541
|
var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
|
|
13542
13542
|
function registerEvents() {
|
|
@@ -13743,7 +13743,7 @@ function requireReactDom_development() {
|
|
|
13743
13743
|
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
|
13744
13744
|
*/
|
|
13745
13745
|
function isEventSupported(eventNameSuffix) {
|
|
13746
|
-
if (!
|
|
13746
|
+
if (!canUseDOM2) {
|
|
13747
13747
|
return false;
|
|
13748
13748
|
}
|
|
13749
13749
|
var eventName = "on" + eventNameSuffix;
|
|
@@ -13795,7 +13795,7 @@ function requireReactDom_development() {
|
|
|
13795
13795
|
}
|
|
13796
13796
|
}
|
|
13797
13797
|
var isInputEventSupported = false;
|
|
13798
|
-
if (
|
|
13798
|
+
if (canUseDOM2) {
|
|
13799
13799
|
isInputEventSupported = isEventSupported("input") && (!document.documentMode || document.documentMode > 9);
|
|
13800
13800
|
}
|
|
13801
13801
|
function startWatchingForValueChange(target, targetInst) {
|
|
@@ -13977,7 +13977,7 @@ function requireReactDom_development() {
|
|
|
13977
13977
|
}
|
|
13978
13978
|
for (var i = 0; i < keysA.length; i++) {
|
|
13979
13979
|
var currentKey = keysA[i];
|
|
13980
|
-
if (!
|
|
13980
|
+
if (!hasOwnProperty2.call(objB, currentKey) || !objectIs(objA[currentKey], objB[currentKey])) {
|
|
13981
13981
|
return false;
|
|
13982
13982
|
}
|
|
13983
13983
|
}
|
|
@@ -14227,7 +14227,7 @@ function requireReactDom_development() {
|
|
|
14227
14227
|
setOffsets(input, offsets);
|
|
14228
14228
|
}
|
|
14229
14229
|
}
|
|
14230
|
-
var skipSelectionChangeEvent =
|
|
14230
|
+
var skipSelectionChangeEvent = canUseDOM2 && "documentMode" in document && document.documentMode <= 11;
|
|
14231
14231
|
function registerEvents$3() {
|
|
14232
14232
|
registerTwoPhaseEvent("onSelect", ["focusout", "contextmenu", "dragend", "focusin", "keydown", "keyup", "mousedown", "mouseup", "selectionchange"]);
|
|
14233
14233
|
}
|
|
@@ -14335,7 +14335,7 @@ function requireReactDom_development() {
|
|
|
14335
14335
|
};
|
|
14336
14336
|
var prefixedEventNames = {};
|
|
14337
14337
|
var style = {};
|
|
14338
|
-
if (
|
|
14338
|
+
if (canUseDOM2) {
|
|
14339
14339
|
style = document.createElement("div").style;
|
|
14340
14340
|
if (!("AnimationEvent" in window)) {
|
|
14341
14341
|
delete vendorPrefixes.animationend.animation;
|
|
@@ -14850,7 +14850,7 @@ function requireReactDom_development() {
|
|
|
14850
14850
|
possibleRegistrationNames
|
|
14851
14851
|
});
|
|
14852
14852
|
};
|
|
14853
|
-
canDiffStyleForHydrationWarning =
|
|
14853
|
+
canDiffStyleForHydrationWarning = canUseDOM2 && !document.documentMode;
|
|
14854
14854
|
warnForPropDifference = function(propName, serverValue, clientValue) {
|
|
14855
14855
|
if (didWarnInvalidHydration) {
|
|
14856
14856
|
return;
|
|
@@ -15020,7 +15020,7 @@ function requireReactDom_development() {
|
|
|
15020
15020
|
}
|
|
15021
15021
|
{
|
|
15022
15022
|
if (namespaceURI === HTML_NAMESPACE) {
|
|
15023
|
-
if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === "[object HTMLUnknownElement]" && !
|
|
15023
|
+
if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === "[object HTMLUnknownElement]" && !hasOwnProperty2.call(warnedUnknownTags, type)) {
|
|
15024
15024
|
warnedUnknownTags[type] = true;
|
|
15025
15025
|
error("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.", type);
|
|
15026
15026
|
}
|
|
@@ -16371,7 +16371,7 @@ function requireReactDom_development() {
|
|
|
16371
16371
|
}
|
|
16372
16372
|
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
|
16373
16373
|
{
|
|
16374
|
-
var has22 = Function.call.bind(
|
|
16374
|
+
var has22 = Function.call.bind(hasOwnProperty2);
|
|
16375
16375
|
for (var typeSpecName in typeSpecs) {
|
|
16376
16376
|
if (has22(typeSpecs, typeSpecName)) {
|
|
16377
16377
|
var error$1 = void 0;
|
|
@@ -23949,7 +23949,7 @@ function requireReactDom_development() {
|
|
|
23949
23949
|
row = row.sibling;
|
|
23950
23950
|
}
|
|
23951
23951
|
}
|
|
23952
|
-
if (renderState.tail !== null &&
|
|
23952
|
+
if (renderState.tail !== null && now2() > getRenderTargetTime()) {
|
|
23953
23953
|
workInProgress2.flags |= DidCapture;
|
|
23954
23954
|
didSuspendAlready = true;
|
|
23955
23955
|
cutOffTailIfNeeded(renderState, false);
|
|
@@ -23978,7 +23978,7 @@ function requireReactDom_development() {
|
|
|
23978
23978
|
// The time it took to render last row is greater than the remaining
|
|
23979
23979
|
// time we have to render. So rendering one more row would likely
|
|
23980
23980
|
// exceed it.
|
|
23981
|
-
|
|
23981
|
+
now2() * 2 - renderState.renderingStartTime > getRenderTargetTime() && renderLanes2 !== OffscreenLane
|
|
23982
23982
|
) {
|
|
23983
23983
|
workInProgress2.flags |= DidCapture;
|
|
23984
23984
|
didSuspendAlready = true;
|
|
@@ -24003,7 +24003,7 @@ function requireReactDom_development() {
|
|
|
24003
24003
|
var next = renderState.tail;
|
|
24004
24004
|
renderState.rendering = next;
|
|
24005
24005
|
renderState.tail = next.sibling;
|
|
24006
|
-
renderState.renderingStartTime =
|
|
24006
|
+
renderState.renderingStartTime = now2();
|
|
24007
24007
|
next.sibling = null;
|
|
24008
24008
|
var suspenseContext = suspenseStackCursor.current;
|
|
24009
24009
|
if (didSuspendAlready) {
|
|
@@ -25967,7 +25967,7 @@ function requireReactDom_development() {
|
|
|
25967
25967
|
var RENDER_TIMEOUT_MS = 500;
|
|
25968
25968
|
var workInProgressTransitions = null;
|
|
25969
25969
|
function resetRenderTimer() {
|
|
25970
|
-
workInProgressRootRenderTargetTime =
|
|
25970
|
+
workInProgressRootRenderTargetTime = now2() + RENDER_TIMEOUT_MS;
|
|
25971
25971
|
}
|
|
25972
25972
|
function getRenderTargetTime() {
|
|
25973
25973
|
return workInProgressRootRenderTargetTime;
|
|
@@ -25996,12 +25996,12 @@ function requireReactDom_development() {
|
|
|
25996
25996
|
}
|
|
25997
25997
|
function requestEventTime() {
|
|
25998
25998
|
if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
|
|
25999
|
-
return
|
|
25999
|
+
return now2();
|
|
26000
26000
|
}
|
|
26001
26001
|
if (currentEventTime !== NoTimestamp) {
|
|
26002
26002
|
return currentEventTime;
|
|
26003
26003
|
}
|
|
26004
|
-
currentEventTime =
|
|
26004
|
+
currentEventTime = now2();
|
|
26005
26005
|
return currentEventTime;
|
|
26006
26006
|
}
|
|
26007
26007
|
function requestUpdateLane(fiber) {
|
|
@@ -26198,7 +26198,7 @@ function requireReactDom_development() {
|
|
|
26198
26198
|
var fatalError = workInProgressRootFatalError;
|
|
26199
26199
|
prepareFreshStack(root22, NoLanes);
|
|
26200
26200
|
markRootSuspended$1(root22, lanes);
|
|
26201
|
-
ensureRootIsScheduled(root22,
|
|
26201
|
+
ensureRootIsScheduled(root22, now2());
|
|
26202
26202
|
throw fatalError;
|
|
26203
26203
|
}
|
|
26204
26204
|
if (exitStatus === RootDidNotComplete) {
|
|
@@ -26219,7 +26219,7 @@ function requireReactDom_development() {
|
|
|
26219
26219
|
var _fatalError = workInProgressRootFatalError;
|
|
26220
26220
|
prepareFreshStack(root22, NoLanes);
|
|
26221
26221
|
markRootSuspended$1(root22, lanes);
|
|
26222
|
-
ensureRootIsScheduled(root22,
|
|
26222
|
+
ensureRootIsScheduled(root22, now2());
|
|
26223
26223
|
throw _fatalError;
|
|
26224
26224
|
}
|
|
26225
26225
|
}
|
|
@@ -26228,7 +26228,7 @@ function requireReactDom_development() {
|
|
|
26228
26228
|
finishConcurrentRender(root22, exitStatus, lanes);
|
|
26229
26229
|
}
|
|
26230
26230
|
}
|
|
26231
|
-
ensureRootIsScheduled(root22,
|
|
26231
|
+
ensureRootIsScheduled(root22, now2());
|
|
26232
26232
|
if (root22.callbackNode === originalCallbackNode) {
|
|
26233
26233
|
return performConcurrentWorkOnRoot.bind(null, root22);
|
|
26234
26234
|
}
|
|
@@ -26277,7 +26277,7 @@ function requireReactDom_development() {
|
|
|
26277
26277
|
markRootSuspended$1(root22, lanes);
|
|
26278
26278
|
if (includesOnlyRetries(lanes) && // do not delay if we're inside an act() scope
|
|
26279
26279
|
!shouldForceFlushFallbacksInDEV()) {
|
|
26280
|
-
var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS -
|
|
26280
|
+
var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now2();
|
|
26281
26281
|
if (msUntilTimeout > 10) {
|
|
26282
26282
|
var nextLanes = getNextLanes(root22, NoLanes);
|
|
26283
26283
|
if (nextLanes !== NoLanes) {
|
|
@@ -26304,7 +26304,7 @@ function requireReactDom_development() {
|
|
|
26304
26304
|
if (!shouldForceFlushFallbacksInDEV()) {
|
|
26305
26305
|
var mostRecentEventTime = getMostRecentEventTime(root22, lanes);
|
|
26306
26306
|
var eventTimeMs = mostRecentEventTime;
|
|
26307
|
-
var timeElapsedMs =
|
|
26307
|
+
var timeElapsedMs = now2() - eventTimeMs;
|
|
26308
26308
|
var _msUntilTimeout = jnd(timeElapsedMs) - timeElapsedMs;
|
|
26309
26309
|
if (_msUntilTimeout > 10) {
|
|
26310
26310
|
root22.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root22, workInProgressRootRecoverableErrors, workInProgressTransitions), _msUntilTimeout);
|
|
@@ -26381,7 +26381,7 @@ function requireReactDom_development() {
|
|
|
26381
26381
|
flushPassiveEffects();
|
|
26382
26382
|
var lanes = getNextLanes(root22, NoLanes);
|
|
26383
26383
|
if (!includesSomeLane(lanes, SyncLane)) {
|
|
26384
|
-
ensureRootIsScheduled(root22,
|
|
26384
|
+
ensureRootIsScheduled(root22, now2());
|
|
26385
26385
|
return null;
|
|
26386
26386
|
}
|
|
26387
26387
|
var exitStatus = renderRootSync(root22, lanes);
|
|
@@ -26396,7 +26396,7 @@ function requireReactDom_development() {
|
|
|
26396
26396
|
var fatalError = workInProgressRootFatalError;
|
|
26397
26397
|
prepareFreshStack(root22, NoLanes);
|
|
26398
26398
|
markRootSuspended$1(root22, lanes);
|
|
26399
|
-
ensureRootIsScheduled(root22,
|
|
26399
|
+
ensureRootIsScheduled(root22, now2());
|
|
26400
26400
|
throw fatalError;
|
|
26401
26401
|
}
|
|
26402
26402
|
if (exitStatus === RootDidNotComplete) {
|
|
@@ -26406,13 +26406,13 @@ function requireReactDom_development() {
|
|
|
26406
26406
|
root22.finishedWork = finishedWork;
|
|
26407
26407
|
root22.finishedLanes = lanes;
|
|
26408
26408
|
commitRoot(root22, workInProgressRootRecoverableErrors, workInProgressTransitions);
|
|
26409
|
-
ensureRootIsScheduled(root22,
|
|
26409
|
+
ensureRootIsScheduled(root22, now2());
|
|
26410
26410
|
return null;
|
|
26411
26411
|
}
|
|
26412
26412
|
function flushRoot(root22, lanes) {
|
|
26413
26413
|
if (lanes !== NoLanes) {
|
|
26414
26414
|
markRootEntangled(root22, mergeLanes(lanes, SyncLane));
|
|
26415
|
-
ensureRootIsScheduled(root22,
|
|
26415
|
+
ensureRootIsScheduled(root22, now2());
|
|
26416
26416
|
if ((executionContext & (RenderContext | CommitContext)) === NoContext) {
|
|
26417
26417
|
resetRenderTimer();
|
|
26418
26418
|
flushSyncCallbacks();
|
|
@@ -26571,7 +26571,7 @@ function requireReactDom_development() {
|
|
|
26571
26571
|
ReactCurrentDispatcher$2.current = prevDispatcher;
|
|
26572
26572
|
}
|
|
26573
26573
|
function markCommitTimeOfFallback() {
|
|
26574
|
-
globalMostRecentFallbackTime =
|
|
26574
|
+
globalMostRecentFallbackTime = now2();
|
|
26575
26575
|
}
|
|
26576
26576
|
function markSkippedUpdateLanes(lane) {
|
|
26577
26577
|
workInProgressRootSkippedLanes = mergeLanes(lane, workInProgressRootSkippedLanes);
|
|
@@ -26905,7 +26905,7 @@ function requireReactDom_development() {
|
|
|
26905
26905
|
{
|
|
26906
26906
|
onCommitRoot$1();
|
|
26907
26907
|
}
|
|
26908
|
-
ensureRootIsScheduled(root22,
|
|
26908
|
+
ensureRootIsScheduled(root22, now2());
|
|
26909
26909
|
if (recoverableErrors !== null) {
|
|
26910
26910
|
var onRecoverableError = root22.onRecoverableError;
|
|
26911
26911
|
for (var i = 0; i < recoverableErrors.length; i++) {
|
|
@@ -27112,7 +27112,7 @@ function requireReactDom_development() {
|
|
|
27112
27112
|
markRootPinged(root22, pingedLanes);
|
|
27113
27113
|
warnIfSuspenseResolutionNotWrappedWithActDEV(root22);
|
|
27114
27114
|
if (workInProgressRoot === root22 && isSubsetOfLanes(workInProgressRootRenderLanes, pingedLanes)) {
|
|
27115
|
-
if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && includesOnlyRetries(workInProgressRootRenderLanes) &&
|
|
27115
|
+
if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && includesOnlyRetries(workInProgressRootRenderLanes) && now2() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) {
|
|
27116
27116
|
prepareFreshStack(root22, NoLanes);
|
|
27117
27117
|
} else {
|
|
27118
27118
|
workInProgressRootPingedLanes = mergeLanes(workInProgressRootPingedLanes, pingedLanes);
|
|
@@ -29060,7 +29060,7 @@ function requireReactDom_development() {
|
|
|
29060
29060
|
rendererPackageName: "react-dom"
|
|
29061
29061
|
});
|
|
29062
29062
|
{
|
|
29063
|
-
if (!foundDevTools &&
|
|
29063
|
+
if (!foundDevTools && canUseDOM2 && window.top === window.self) {
|
|
29064
29064
|
if (navigator.userAgent.indexOf("Chrome") > -1 && navigator.userAgent.indexOf("Edge") === -1 || navigator.userAgent.indexOf("Firefox") > -1) {
|
|
29065
29065
|
var protocol = window.location.protocol;
|
|
29066
29066
|
if (/^(https?|file):$/.test(protocol)) {
|
|
@@ -29148,9 +29148,9 @@ var TimerBasedFinalizationRegistry = (
|
|
|
29148
29148
|
}
|
|
29149
29149
|
clearTimeout(_this.sweepTimeout);
|
|
29150
29150
|
_this.sweepTimeout = void 0;
|
|
29151
|
-
var
|
|
29151
|
+
var now2 = Date.now();
|
|
29152
29152
|
_this.registrations.forEach(function(registration, token) {
|
|
29153
|
-
if (
|
|
29153
|
+
if (now2 - registration.registeredAt >= maxAge) {
|
|
29154
29154
|
_this.finalize(registration.value);
|
|
29155
29155
|
_this.registrations.delete(token);
|
|
29156
29156
|
}
|
|
@@ -29356,11 +29356,11 @@ function useObserver(render, baseComponentName) {
|
|
|
29356
29356
|
}
|
|
29357
29357
|
return renderResult;
|
|
29358
29358
|
}
|
|
29359
|
-
var _a$
|
|
29359
|
+
var _a$2, _b;
|
|
29360
29360
|
var warnLegacyContextTypes = true;
|
|
29361
29361
|
var hasSymbol = typeof Symbol === "function" && Symbol.for;
|
|
29362
|
-
var isFunctionNameConfigurable = (_b = (_a$
|
|
29363
|
-
}, "name")) === null || _a$
|
|
29362
|
+
var isFunctionNameConfigurable = (_b = (_a$2 = Object.getOwnPropertyDescriptor(function() {
|
|
29363
|
+
}, "name")) === null || _a$2 === void 0 ? void 0 : _a$2.configurable) !== null && _b !== void 0 ? _b : false;
|
|
29364
29364
|
var ReactForwardRefSymbol = hasSymbol ? Symbol.for("react.forward_ref") : typeof reactExports.forwardRef === "function" && reactExports.forwardRef(function(props) {
|
|
29365
29365
|
return null;
|
|
29366
29366
|
})["$$typeof"];
|
|
@@ -29433,9 +29433,9 @@ function copyStaticProperties(base, target) {
|
|
|
29433
29433
|
}
|
|
29434
29434
|
});
|
|
29435
29435
|
}
|
|
29436
|
-
var _a;
|
|
29436
|
+
var _a$1;
|
|
29437
29437
|
observerBatching(reactDomExports.unstable_batchedUpdates);
|
|
29438
|
-
(_a = observerFinalizationRegistry["finalizeAllImmediately"]) !== null && _a !== void 0 ? _a : (function() {
|
|
29438
|
+
(_a$1 = observerFinalizationRegistry["finalizeAllImmediately"]) !== null && _a$1 !== void 0 ? _a$1 : (function() {
|
|
29439
29439
|
});
|
|
29440
29440
|
const createCounter = (processValue, initial = 0) => {
|
|
29441
29441
|
const update = (counter) => {
|
|
@@ -29494,6 +29494,78 @@ const createPubSub = () => {
|
|
|
29494
29494
|
};
|
|
29495
29495
|
return pubSub;
|
|
29496
29496
|
};
|
|
29497
|
+
const TYPE = {
|
|
29498
|
+
Null: "null",
|
|
29499
|
+
Undefined: "undefined",
|
|
29500
|
+
NaN: "nan",
|
|
29501
|
+
Object: "[object Object]",
|
|
29502
|
+
Array: "[object Array]",
|
|
29503
|
+
String: "[object String]",
|
|
29504
|
+
Number: "[object Number]",
|
|
29505
|
+
Boolean: "[object Boolean]",
|
|
29506
|
+
Function: "[object Function]",
|
|
29507
|
+
AsyncFunction: "[object AsyncFunction]",
|
|
29508
|
+
RegExp: "[object RegExp]",
|
|
29509
|
+
Symbol: "[object Symbol]",
|
|
29510
|
+
Infinite: "infinite",
|
|
29511
|
+
Element: "element"
|
|
29512
|
+
};
|
|
29513
|
+
function getType(value) {
|
|
29514
|
+
if (value === void 0) {
|
|
29515
|
+
return TYPE.Undefined;
|
|
29516
|
+
}
|
|
29517
|
+
if (value === null) {
|
|
29518
|
+
return TYPE.Null;
|
|
29519
|
+
}
|
|
29520
|
+
if (value && (value.nodeType === 1 || value.nodeType === 9)) {
|
|
29521
|
+
return TYPE.Element;
|
|
29522
|
+
}
|
|
29523
|
+
const stringifiedValue = Object.prototype.toString.call(value);
|
|
29524
|
+
if (stringifiedValue === TYPE.Number) {
|
|
29525
|
+
if (Number.isNaN(value)) {
|
|
29526
|
+
return TYPE.NaN;
|
|
29527
|
+
}
|
|
29528
|
+
if (!Number.isFinite(value)) {
|
|
29529
|
+
return TYPE.Infinite;
|
|
29530
|
+
}
|
|
29531
|
+
}
|
|
29532
|
+
return stringifiedValue;
|
|
29533
|
+
}
|
|
29534
|
+
const createTypeGuard = (...types) => (value) => types.includes(getType(value));
|
|
29535
|
+
const isDefined = (value) => value != null;
|
|
29536
|
+
const isNull = createTypeGuard(TYPE.Null);
|
|
29537
|
+
const isUndefined = createTypeGuard(TYPE.Undefined);
|
|
29538
|
+
const isObject$1 = createTypeGuard(TYPE.Object);
|
|
29539
|
+
const isArray = createTypeGuard(TYPE.Array);
|
|
29540
|
+
const isString = createTypeGuard(TYPE.String);
|
|
29541
|
+
const isNumber$1 = createTypeGuard(TYPE.Number);
|
|
29542
|
+
const isBoolean = createTypeGuard(TYPE.Boolean);
|
|
29543
|
+
const isFunction = createTypeGuard(
|
|
29544
|
+
TYPE.Function,
|
|
29545
|
+
TYPE.AsyncFunction
|
|
29546
|
+
);
|
|
29547
|
+
const isRegExp = createTypeGuard(TYPE.RegExp);
|
|
29548
|
+
const isElement = createTypeGuard(TYPE.Element);
|
|
29549
|
+
const isNaN$1 = createTypeGuard(TYPE.NaN);
|
|
29550
|
+
const isInfinite = createTypeGuard(TYPE.Infinite);
|
|
29551
|
+
const isSymbol$1 = createTypeGuard(TYPE.Symbol);
|
|
29552
|
+
const _exports = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
29553
|
+
__proto__: null,
|
|
29554
|
+
isArray,
|
|
29555
|
+
isBoolean,
|
|
29556
|
+
isDefined,
|
|
29557
|
+
isElement,
|
|
29558
|
+
isFunction,
|
|
29559
|
+
isInfinite,
|
|
29560
|
+
isNaN: isNaN$1,
|
|
29561
|
+
isNull,
|
|
29562
|
+
isNumber: isNumber$1,
|
|
29563
|
+
isObject: isObject$1,
|
|
29564
|
+
isRegExp,
|
|
29565
|
+
isString,
|
|
29566
|
+
isSymbol: isSymbol$1,
|
|
29567
|
+
isUndefined
|
|
29568
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
29497
29569
|
const applyObservable$1 = (context, annotationsArray, useDecorators) => {
|
|
29498
29570
|
if (useDecorators) {
|
|
29499
29571
|
annotationsArray.forEach(([field, annotation]) => {
|
|
@@ -29504,6 +29576,43 @@ const applyObservable$1 = (context, annotationsArray, useDecorators) => {
|
|
|
29504
29576
|
makeObservable(context, Object.fromEntries(annotationsArray));
|
|
29505
29577
|
}
|
|
29506
29578
|
};
|
|
29579
|
+
const createRef = (cfg) => {
|
|
29580
|
+
let lastValue;
|
|
29581
|
+
const comparer$1 = cfg?.comparer ?? comparer.default;
|
|
29582
|
+
const ref = (value) => {
|
|
29583
|
+
const nextValue = value ?? null;
|
|
29584
|
+
if (comparer$1(ref.current, nextValue)) {
|
|
29585
|
+
return;
|
|
29586
|
+
}
|
|
29587
|
+
runInAction(() => {
|
|
29588
|
+
lastValue = ref.current ?? void 0;
|
|
29589
|
+
ref.current = nextValue;
|
|
29590
|
+
ref.listeners.forEach((listener) => {
|
|
29591
|
+
listener(ref.current, lastValue);
|
|
29592
|
+
});
|
|
29593
|
+
if (ref.current === null && lastValue !== void 0) {
|
|
29594
|
+
lastValue = void 0;
|
|
29595
|
+
}
|
|
29596
|
+
});
|
|
29597
|
+
};
|
|
29598
|
+
ref.listeners = new Set(cfg?.onChange ? [cfg.onChange] : []);
|
|
29599
|
+
if (cfg?.onSet || cfg?.onUnset) {
|
|
29600
|
+
ref.listeners.add((value, prevValue) => {
|
|
29601
|
+
if (value) {
|
|
29602
|
+
cfg.onSet?.(value, prevValue);
|
|
29603
|
+
} else {
|
|
29604
|
+
cfg.onUnset?.(prevValue);
|
|
29605
|
+
}
|
|
29606
|
+
});
|
|
29607
|
+
}
|
|
29608
|
+
ref.current = cfg?.initial ?? null;
|
|
29609
|
+
ref.meta = cfg?.meta ?? {};
|
|
29610
|
+
makeObservable(ref, {
|
|
29611
|
+
current: observable.ref,
|
|
29612
|
+
meta: observable
|
|
29613
|
+
});
|
|
29614
|
+
return ref;
|
|
29615
|
+
};
|
|
29507
29616
|
const isShallowEqual = (a2, b2) => {
|
|
29508
29617
|
if (a2 === b2) return true;
|
|
29509
29618
|
if (typeof a2 !== "object" || typeof b2 !== "object" || a2 === null || b2 === null) {
|
|
@@ -31284,58 +31393,1097 @@ class ViewModelImpl extends ViewModelBase {
|
|
|
31284
31393
|
});
|
|
31285
31394
|
}
|
|
31286
31395
|
}
|
|
31287
|
-
|
|
31288
|
-
|
|
31289
|
-
|
|
31290
|
-
|
|
31291
|
-
|
|
31292
|
-
|
|
31293
|
-
|
|
31294
|
-
|
|
31396
|
+
function isObject(value) {
|
|
31397
|
+
var type = typeof value;
|
|
31398
|
+
return value != null && (type == "object" || type == "function");
|
|
31399
|
+
}
|
|
31400
|
+
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
31401
|
+
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
31402
|
+
var root$1 = freeGlobal || freeSelf || Function("return this")();
|
|
31403
|
+
var now = function() {
|
|
31404
|
+
return root$1.Date.now();
|
|
31405
|
+
};
|
|
31406
|
+
var reWhitespace = /\s/;
|
|
31407
|
+
function trimmedEndIndex(string2) {
|
|
31408
|
+
var index = string2.length;
|
|
31409
|
+
while (index-- && reWhitespace.test(string2.charAt(index))) {
|
|
31295
31410
|
}
|
|
31296
|
-
|
|
31297
|
-
|
|
31411
|
+
return index;
|
|
31412
|
+
}
|
|
31413
|
+
var reTrimStart = /^\s+/;
|
|
31414
|
+
function baseTrim(string2) {
|
|
31415
|
+
return string2 ? string2.slice(0, trimmedEndIndex(string2) + 1).replace(reTrimStart, "") : string2;
|
|
31416
|
+
}
|
|
31417
|
+
var Symbol$1 = root$1.Symbol;
|
|
31418
|
+
var objectProto$1 = Object.prototype;
|
|
31419
|
+
var hasOwnProperty = objectProto$1.hasOwnProperty;
|
|
31420
|
+
var nativeObjectToString$1 = objectProto$1.toString;
|
|
31421
|
+
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0;
|
|
31422
|
+
function getRawTag(value) {
|
|
31423
|
+
var isOwn = hasOwnProperty.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
31424
|
+
try {
|
|
31425
|
+
value[symToStringTag$1] = void 0;
|
|
31426
|
+
var unmasked = true;
|
|
31427
|
+
} catch (e) {
|
|
31428
|
+
}
|
|
31429
|
+
var result = nativeObjectToString$1.call(value);
|
|
31430
|
+
if (unmasked) {
|
|
31431
|
+
if (isOwn) {
|
|
31432
|
+
value[symToStringTag$1] = tag;
|
|
31433
|
+
} else {
|
|
31434
|
+
delete value[symToStringTag$1];
|
|
31435
|
+
}
|
|
31298
31436
|
}
|
|
31299
|
-
|
|
31300
|
-
|
|
31437
|
+
return result;
|
|
31438
|
+
}
|
|
31439
|
+
var objectProto = Object.prototype;
|
|
31440
|
+
var nativeObjectToString = objectProto.toString;
|
|
31441
|
+
function objectToString(value) {
|
|
31442
|
+
return nativeObjectToString.call(value);
|
|
31443
|
+
}
|
|
31444
|
+
var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
|
|
31445
|
+
var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : void 0;
|
|
31446
|
+
function baseGetTag(value) {
|
|
31447
|
+
if (value == null) {
|
|
31448
|
+
return value === void 0 ? undefinedTag : nullTag;
|
|
31301
31449
|
}
|
|
31302
|
-
|
|
31303
|
-
|
|
31450
|
+
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
31451
|
+
}
|
|
31452
|
+
function isObjectLike(value) {
|
|
31453
|
+
return value != null && typeof value == "object";
|
|
31454
|
+
}
|
|
31455
|
+
var symbolTag = "[object Symbol]";
|
|
31456
|
+
function isSymbol(value) {
|
|
31457
|
+
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
|
|
31458
|
+
}
|
|
31459
|
+
var NAN = 0 / 0;
|
|
31460
|
+
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
31461
|
+
var reIsBinary = /^0b[01]+$/i;
|
|
31462
|
+
var reIsOctal = /^0o[0-7]+$/i;
|
|
31463
|
+
var freeParseInt = parseInt;
|
|
31464
|
+
function toNumber(value) {
|
|
31465
|
+
if (typeof value == "number") {
|
|
31466
|
+
return value;
|
|
31467
|
+
}
|
|
31468
|
+
if (isSymbol(value)) {
|
|
31469
|
+
return NAN;
|
|
31470
|
+
}
|
|
31471
|
+
if (isObject(value)) {
|
|
31472
|
+
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
|
31473
|
+
value = isObject(other) ? other + "" : other;
|
|
31474
|
+
}
|
|
31475
|
+
if (typeof value != "string") {
|
|
31476
|
+
return value === 0 ? value : +value;
|
|
31304
31477
|
}
|
|
31478
|
+
value = baseTrim(value);
|
|
31479
|
+
var isBinary = reIsBinary.test(value);
|
|
31480
|
+
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
|
31305
31481
|
}
|
|
31306
|
-
|
|
31307
|
-
|
|
31308
|
-
|
|
31309
|
-
|
|
31310
|
-
|
|
31311
|
-
|
|
31312
|
-
|
|
31482
|
+
var FUNC_ERROR_TEXT$1 = "Expected a function";
|
|
31483
|
+
var nativeMax = Math.max, nativeMin = Math.min;
|
|
31484
|
+
function debounce(func, wait, options) {
|
|
31485
|
+
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
|
31486
|
+
if (typeof func != "function") {
|
|
31487
|
+
throw new TypeError(FUNC_ERROR_TEXT$1);
|
|
31488
|
+
}
|
|
31489
|
+
wait = toNumber(wait) || 0;
|
|
31490
|
+
if (isObject(options)) {
|
|
31491
|
+
leading = !!options.leading;
|
|
31492
|
+
maxing = "maxWait" in options;
|
|
31493
|
+
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
|
31494
|
+
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
31495
|
+
}
|
|
31496
|
+
function invokeFunc(time) {
|
|
31497
|
+
var args = lastArgs, thisArg = lastThis;
|
|
31498
|
+
lastArgs = lastThis = void 0;
|
|
31499
|
+
lastInvokeTime = time;
|
|
31500
|
+
result = func.apply(thisArg, args);
|
|
31501
|
+
return result;
|
|
31313
31502
|
}
|
|
31314
|
-
|
|
31315
|
-
|
|
31503
|
+
function leadingEdge(time) {
|
|
31504
|
+
lastInvokeTime = time;
|
|
31505
|
+
timerId = setTimeout(timerExpired, wait);
|
|
31506
|
+
return leading ? invokeFunc(time) : result;
|
|
31316
31507
|
}
|
|
31317
|
-
|
|
31318
|
-
|
|
31508
|
+
function remainingWait(time) {
|
|
31509
|
+
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
|
|
31510
|
+
return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
|
|
31319
31511
|
}
|
|
31512
|
+
function shouldInvoke(time) {
|
|
31513
|
+
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
|
|
31514
|
+
return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
|
|
31515
|
+
}
|
|
31516
|
+
function timerExpired() {
|
|
31517
|
+
var time = now();
|
|
31518
|
+
if (shouldInvoke(time)) {
|
|
31519
|
+
return trailingEdge(time);
|
|
31520
|
+
}
|
|
31521
|
+
timerId = setTimeout(timerExpired, remainingWait(time));
|
|
31522
|
+
}
|
|
31523
|
+
function trailingEdge(time) {
|
|
31524
|
+
timerId = void 0;
|
|
31525
|
+
if (trailing && lastArgs) {
|
|
31526
|
+
return invokeFunc(time);
|
|
31527
|
+
}
|
|
31528
|
+
lastArgs = lastThis = void 0;
|
|
31529
|
+
return result;
|
|
31530
|
+
}
|
|
31531
|
+
function cancel() {
|
|
31532
|
+
if (timerId !== void 0) {
|
|
31533
|
+
clearTimeout(timerId);
|
|
31534
|
+
}
|
|
31535
|
+
lastInvokeTime = 0;
|
|
31536
|
+
lastArgs = lastCallTime = lastThis = timerId = void 0;
|
|
31537
|
+
}
|
|
31538
|
+
function flush() {
|
|
31539
|
+
return timerId === void 0 ? result : trailingEdge(now());
|
|
31540
|
+
}
|
|
31541
|
+
function debounced() {
|
|
31542
|
+
var time = now(), isInvoking = shouldInvoke(time);
|
|
31543
|
+
lastArgs = arguments;
|
|
31544
|
+
lastThis = this;
|
|
31545
|
+
lastCallTime = time;
|
|
31546
|
+
if (isInvoking) {
|
|
31547
|
+
if (timerId === void 0) {
|
|
31548
|
+
return leadingEdge(lastCallTime);
|
|
31549
|
+
}
|
|
31550
|
+
if (maxing) {
|
|
31551
|
+
clearTimeout(timerId);
|
|
31552
|
+
timerId = setTimeout(timerExpired, wait);
|
|
31553
|
+
return invokeFunc(lastCallTime);
|
|
31554
|
+
}
|
|
31555
|
+
}
|
|
31556
|
+
if (timerId === void 0) {
|
|
31557
|
+
timerId = setTimeout(timerExpired, wait);
|
|
31558
|
+
}
|
|
31559
|
+
return result;
|
|
31560
|
+
}
|
|
31561
|
+
debounced.cancel = cancel;
|
|
31562
|
+
debounced.flush = flush;
|
|
31563
|
+
return debounced;
|
|
31320
31564
|
}
|
|
31321
|
-
|
|
31322
|
-
|
|
31323
|
-
|
|
31324
|
-
|
|
31325
|
-
|
|
31326
|
-
|
|
31327
|
-
|
|
31565
|
+
var FUNC_ERROR_TEXT = "Expected a function";
|
|
31566
|
+
function throttle(func, wait, options) {
|
|
31567
|
+
var leading = true, trailing = true;
|
|
31568
|
+
if (typeof func != "function") {
|
|
31569
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
31570
|
+
}
|
|
31571
|
+
if (isObject(options)) {
|
|
31572
|
+
leading = "leading" in options ? !!options.leading : leading;
|
|
31573
|
+
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
31574
|
+
}
|
|
31575
|
+
return debounce(func, wait, {
|
|
31576
|
+
"leading": leading,
|
|
31577
|
+
"maxWait": wait,
|
|
31578
|
+
"trailing": trailing
|
|
31579
|
+
});
|
|
31580
|
+
}
|
|
31581
|
+
var __assign = function() {
|
|
31582
|
+
__assign = Object.assign || function __assign2(t) {
|
|
31583
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
31584
|
+
s = arguments[i];
|
|
31585
|
+
for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2)) t[p2] = s[p2];
|
|
31328
31586
|
}
|
|
31587
|
+
return t;
|
|
31329
31588
|
};
|
|
31330
|
-
|
|
31331
|
-
|
|
31332
|
-
|
|
31333
|
-
|
|
31334
|
-
|
|
31335
|
-
handleToggleOpen: action,
|
|
31336
|
-
handleClosePopupClick: action
|
|
31337
|
-
});
|
|
31589
|
+
return __assign.apply(this, arguments);
|
|
31590
|
+
};
|
|
31591
|
+
function getElementWindow$1(element) {
|
|
31592
|
+
if (!element || !element.ownerDocument || !element.ownerDocument.defaultView) {
|
|
31593
|
+
return window;
|
|
31338
31594
|
}
|
|
31595
|
+
return element.ownerDocument.defaultView;
|
|
31596
|
+
}
|
|
31597
|
+
function getElementDocument$1(element) {
|
|
31598
|
+
if (!element || !element.ownerDocument) {
|
|
31599
|
+
return document;
|
|
31600
|
+
}
|
|
31601
|
+
return element.ownerDocument;
|
|
31602
|
+
}
|
|
31603
|
+
var getOptions$1 = function(obj) {
|
|
31604
|
+
var initialObj = {};
|
|
31605
|
+
var options = Array.prototype.reduce.call(obj, function(acc, attribute) {
|
|
31606
|
+
var option2 = attribute.name.match(/data-simplebar-(.+)/);
|
|
31607
|
+
if (option2) {
|
|
31608
|
+
var key = option2[1].replace(/\W+(.)/g, function(_15, chr) {
|
|
31609
|
+
return chr.toUpperCase();
|
|
31610
|
+
});
|
|
31611
|
+
switch (attribute.value) {
|
|
31612
|
+
case "true":
|
|
31613
|
+
acc[key] = true;
|
|
31614
|
+
break;
|
|
31615
|
+
case "false":
|
|
31616
|
+
acc[key] = false;
|
|
31617
|
+
break;
|
|
31618
|
+
case void 0:
|
|
31619
|
+
acc[key] = true;
|
|
31620
|
+
break;
|
|
31621
|
+
default:
|
|
31622
|
+
acc[key] = attribute.value;
|
|
31623
|
+
}
|
|
31624
|
+
}
|
|
31625
|
+
return acc;
|
|
31626
|
+
}, initialObj);
|
|
31627
|
+
return options;
|
|
31628
|
+
};
|
|
31629
|
+
function addClasses$1(el, classes) {
|
|
31630
|
+
var _a2;
|
|
31631
|
+
if (!el)
|
|
31632
|
+
return;
|
|
31633
|
+
(_a2 = el.classList).add.apply(_a2, classes.split(" "));
|
|
31634
|
+
}
|
|
31635
|
+
function removeClasses$1(el, classes) {
|
|
31636
|
+
if (!el)
|
|
31637
|
+
return;
|
|
31638
|
+
classes.split(" ").forEach(function(className) {
|
|
31639
|
+
el.classList.remove(className);
|
|
31640
|
+
});
|
|
31641
|
+
}
|
|
31642
|
+
function classNamesToQuery$1(classNames) {
|
|
31643
|
+
return ".".concat(classNames.split(" ").join("."));
|
|
31644
|
+
}
|
|
31645
|
+
var canUseDOM$1 = !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
31646
|
+
var helpers = /* @__PURE__ */ Object.freeze({
|
|
31647
|
+
__proto__: null,
|
|
31648
|
+
addClasses: addClasses$1,
|
|
31649
|
+
canUseDOM: canUseDOM$1,
|
|
31650
|
+
classNamesToQuery: classNamesToQuery$1,
|
|
31651
|
+
getElementDocument: getElementDocument$1,
|
|
31652
|
+
getElementWindow: getElementWindow$1,
|
|
31653
|
+
getOptions: getOptions$1,
|
|
31654
|
+
removeClasses: removeClasses$1
|
|
31655
|
+
});
|
|
31656
|
+
var cachedScrollbarWidth = null;
|
|
31657
|
+
var cachedDevicePixelRatio = null;
|
|
31658
|
+
if (canUseDOM$1) {
|
|
31659
|
+
window.addEventListener("resize", function() {
|
|
31660
|
+
if (cachedDevicePixelRatio !== window.devicePixelRatio) {
|
|
31661
|
+
cachedDevicePixelRatio = window.devicePixelRatio;
|
|
31662
|
+
cachedScrollbarWidth = null;
|
|
31663
|
+
}
|
|
31664
|
+
});
|
|
31665
|
+
}
|
|
31666
|
+
function scrollbarWidth() {
|
|
31667
|
+
if (cachedScrollbarWidth === null) {
|
|
31668
|
+
if (typeof document === "undefined") {
|
|
31669
|
+
cachedScrollbarWidth = 0;
|
|
31670
|
+
return cachedScrollbarWidth;
|
|
31671
|
+
}
|
|
31672
|
+
var body = document.body;
|
|
31673
|
+
var box2 = document.createElement("div");
|
|
31674
|
+
box2.classList.add("simplebar-hide-scrollbar");
|
|
31675
|
+
body.appendChild(box2);
|
|
31676
|
+
var width = box2.getBoundingClientRect().right;
|
|
31677
|
+
body.removeChild(box2);
|
|
31678
|
+
cachedScrollbarWidth = width;
|
|
31679
|
+
}
|
|
31680
|
+
return cachedScrollbarWidth;
|
|
31681
|
+
}
|
|
31682
|
+
var getElementWindow = getElementWindow$1, getElementDocument = getElementDocument$1, getOptions$2 = getOptions$1, addClasses$2 = addClasses$1, removeClasses = removeClasses$1, classNamesToQuery = classNamesToQuery$1;
|
|
31683
|
+
var SimpleBarCore = (
|
|
31684
|
+
/** @class */
|
|
31685
|
+
(function() {
|
|
31686
|
+
function SimpleBarCore2(element, options) {
|
|
31687
|
+
if (options === void 0) {
|
|
31688
|
+
options = {};
|
|
31689
|
+
}
|
|
31690
|
+
var _this = this;
|
|
31691
|
+
this.removePreventClickId = null;
|
|
31692
|
+
this.minScrollbarWidth = 20;
|
|
31693
|
+
this.stopScrollDelay = 175;
|
|
31694
|
+
this.isScrolling = false;
|
|
31695
|
+
this.isMouseEntering = false;
|
|
31696
|
+
this.isDragging = false;
|
|
31697
|
+
this.scrollXTicking = false;
|
|
31698
|
+
this.scrollYTicking = false;
|
|
31699
|
+
this.wrapperEl = null;
|
|
31700
|
+
this.contentWrapperEl = null;
|
|
31701
|
+
this.contentEl = null;
|
|
31702
|
+
this.offsetEl = null;
|
|
31703
|
+
this.maskEl = null;
|
|
31704
|
+
this.placeholderEl = null;
|
|
31705
|
+
this.heightAutoObserverWrapperEl = null;
|
|
31706
|
+
this.heightAutoObserverEl = null;
|
|
31707
|
+
this.rtlHelpers = null;
|
|
31708
|
+
this.scrollbarWidth = 0;
|
|
31709
|
+
this.resizeObserver = null;
|
|
31710
|
+
this.mutationObserver = null;
|
|
31711
|
+
this.elStyles = null;
|
|
31712
|
+
this.isRtl = null;
|
|
31713
|
+
this.mouseX = 0;
|
|
31714
|
+
this.mouseY = 0;
|
|
31715
|
+
this.onMouseMove = function() {
|
|
31716
|
+
};
|
|
31717
|
+
this.onWindowResize = function() {
|
|
31718
|
+
};
|
|
31719
|
+
this.onStopScrolling = function() {
|
|
31720
|
+
};
|
|
31721
|
+
this.onMouseEntered = function() {
|
|
31722
|
+
};
|
|
31723
|
+
this.onScroll = function() {
|
|
31724
|
+
var elWindow = getElementWindow(_this.el);
|
|
31725
|
+
if (!_this.scrollXTicking) {
|
|
31726
|
+
elWindow.requestAnimationFrame(_this.scrollX);
|
|
31727
|
+
_this.scrollXTicking = true;
|
|
31728
|
+
}
|
|
31729
|
+
if (!_this.scrollYTicking) {
|
|
31730
|
+
elWindow.requestAnimationFrame(_this.scrollY);
|
|
31731
|
+
_this.scrollYTicking = true;
|
|
31732
|
+
}
|
|
31733
|
+
if (!_this.isScrolling) {
|
|
31734
|
+
_this.isScrolling = true;
|
|
31735
|
+
addClasses$2(_this.el, _this.classNames.scrolling);
|
|
31736
|
+
}
|
|
31737
|
+
_this.showScrollbar("x");
|
|
31738
|
+
_this.showScrollbar("y");
|
|
31739
|
+
_this.onStopScrolling();
|
|
31740
|
+
};
|
|
31741
|
+
this.scrollX = function() {
|
|
31742
|
+
if (_this.axis.x.isOverflowing) {
|
|
31743
|
+
_this.positionScrollbar("x");
|
|
31744
|
+
}
|
|
31745
|
+
_this.scrollXTicking = false;
|
|
31746
|
+
};
|
|
31747
|
+
this.scrollY = function() {
|
|
31748
|
+
if (_this.axis.y.isOverflowing) {
|
|
31749
|
+
_this.positionScrollbar("y");
|
|
31750
|
+
}
|
|
31751
|
+
_this.scrollYTicking = false;
|
|
31752
|
+
};
|
|
31753
|
+
this._onStopScrolling = function() {
|
|
31754
|
+
removeClasses(_this.el, _this.classNames.scrolling);
|
|
31755
|
+
if (_this.options.autoHide) {
|
|
31756
|
+
_this.hideScrollbar("x");
|
|
31757
|
+
_this.hideScrollbar("y");
|
|
31758
|
+
}
|
|
31759
|
+
_this.isScrolling = false;
|
|
31760
|
+
};
|
|
31761
|
+
this.onMouseEnter = function() {
|
|
31762
|
+
if (!_this.isMouseEntering) {
|
|
31763
|
+
addClasses$2(_this.el, _this.classNames.mouseEntered);
|
|
31764
|
+
_this.showScrollbar("x");
|
|
31765
|
+
_this.showScrollbar("y");
|
|
31766
|
+
_this.isMouseEntering = true;
|
|
31767
|
+
}
|
|
31768
|
+
_this.onMouseEntered();
|
|
31769
|
+
};
|
|
31770
|
+
this._onMouseEntered = function() {
|
|
31771
|
+
removeClasses(_this.el, _this.classNames.mouseEntered);
|
|
31772
|
+
if (_this.options.autoHide) {
|
|
31773
|
+
_this.hideScrollbar("x");
|
|
31774
|
+
_this.hideScrollbar("y");
|
|
31775
|
+
}
|
|
31776
|
+
_this.isMouseEntering = false;
|
|
31777
|
+
};
|
|
31778
|
+
this._onMouseMove = function(e) {
|
|
31779
|
+
_this.mouseX = e.clientX;
|
|
31780
|
+
_this.mouseY = e.clientY;
|
|
31781
|
+
if (_this.axis.x.isOverflowing || _this.axis.x.forceVisible) {
|
|
31782
|
+
_this.onMouseMoveForAxis("x");
|
|
31783
|
+
}
|
|
31784
|
+
if (_this.axis.y.isOverflowing || _this.axis.y.forceVisible) {
|
|
31785
|
+
_this.onMouseMoveForAxis("y");
|
|
31786
|
+
}
|
|
31787
|
+
};
|
|
31788
|
+
this.onMouseLeave = function() {
|
|
31789
|
+
_this.onMouseMove.cancel();
|
|
31790
|
+
if (_this.axis.x.isOverflowing || _this.axis.x.forceVisible) {
|
|
31791
|
+
_this.onMouseLeaveForAxis("x");
|
|
31792
|
+
}
|
|
31793
|
+
if (_this.axis.y.isOverflowing || _this.axis.y.forceVisible) {
|
|
31794
|
+
_this.onMouseLeaveForAxis("y");
|
|
31795
|
+
}
|
|
31796
|
+
_this.mouseX = -1;
|
|
31797
|
+
_this.mouseY = -1;
|
|
31798
|
+
};
|
|
31799
|
+
this._onWindowResize = function() {
|
|
31800
|
+
_this.scrollbarWidth = _this.getScrollbarWidth();
|
|
31801
|
+
_this.hideNativeScrollbar();
|
|
31802
|
+
};
|
|
31803
|
+
this.onPointerEvent = function(e) {
|
|
31804
|
+
if (!_this.axis.x.track.el || !_this.axis.y.track.el || !_this.axis.x.scrollbar.el || !_this.axis.y.scrollbar.el)
|
|
31805
|
+
return;
|
|
31806
|
+
var isWithinTrackXBounds, isWithinTrackYBounds;
|
|
31807
|
+
_this.axis.x.track.rect = _this.axis.x.track.el.getBoundingClientRect();
|
|
31808
|
+
_this.axis.y.track.rect = _this.axis.y.track.el.getBoundingClientRect();
|
|
31809
|
+
if (_this.axis.x.isOverflowing || _this.axis.x.forceVisible) {
|
|
31810
|
+
isWithinTrackXBounds = _this.isWithinBounds(_this.axis.x.track.rect);
|
|
31811
|
+
}
|
|
31812
|
+
if (_this.axis.y.isOverflowing || _this.axis.y.forceVisible) {
|
|
31813
|
+
isWithinTrackYBounds = _this.isWithinBounds(_this.axis.y.track.rect);
|
|
31814
|
+
}
|
|
31815
|
+
if (isWithinTrackXBounds || isWithinTrackYBounds) {
|
|
31816
|
+
e.stopPropagation();
|
|
31817
|
+
if (e.type === "pointerdown" && e.pointerType !== "touch") {
|
|
31818
|
+
if (isWithinTrackXBounds) {
|
|
31819
|
+
_this.axis.x.scrollbar.rect = _this.axis.x.scrollbar.el.getBoundingClientRect();
|
|
31820
|
+
if (_this.isWithinBounds(_this.axis.x.scrollbar.rect)) {
|
|
31821
|
+
_this.onDragStart(e, "x");
|
|
31822
|
+
} else {
|
|
31823
|
+
_this.onTrackClick(e, "x");
|
|
31824
|
+
}
|
|
31825
|
+
}
|
|
31826
|
+
if (isWithinTrackYBounds) {
|
|
31827
|
+
_this.axis.y.scrollbar.rect = _this.axis.y.scrollbar.el.getBoundingClientRect();
|
|
31828
|
+
if (_this.isWithinBounds(_this.axis.y.scrollbar.rect)) {
|
|
31829
|
+
_this.onDragStart(e, "y");
|
|
31830
|
+
} else {
|
|
31831
|
+
_this.onTrackClick(e, "y");
|
|
31832
|
+
}
|
|
31833
|
+
}
|
|
31834
|
+
}
|
|
31835
|
+
}
|
|
31836
|
+
};
|
|
31837
|
+
this.drag = function(e) {
|
|
31838
|
+
var _a2, _b2, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
31839
|
+
if (!_this.draggedAxis || !_this.contentWrapperEl)
|
|
31840
|
+
return;
|
|
31841
|
+
var eventOffset;
|
|
31842
|
+
var track = _this.axis[_this.draggedAxis].track;
|
|
31843
|
+
var trackSize = (_b2 = (_a2 = track.rect) === null || _a2 === void 0 ? void 0 : _a2[_this.axis[_this.draggedAxis].sizeAttr]) !== null && _b2 !== void 0 ? _b2 : 0;
|
|
31844
|
+
var scrollbar = _this.axis[_this.draggedAxis].scrollbar;
|
|
31845
|
+
var contentSize = (_d = (_c = _this.contentWrapperEl) === null || _c === void 0 ? void 0 : _c[_this.axis[_this.draggedAxis].scrollSizeAttr]) !== null && _d !== void 0 ? _d : 0;
|
|
31846
|
+
var hostSize = parseInt((_f = (_e = _this.elStyles) === null || _e === void 0 ? void 0 : _e[_this.axis[_this.draggedAxis].sizeAttr]) !== null && _f !== void 0 ? _f : "0px", 10);
|
|
31847
|
+
e.preventDefault();
|
|
31848
|
+
e.stopPropagation();
|
|
31849
|
+
if (_this.draggedAxis === "y") {
|
|
31850
|
+
eventOffset = e.pageY;
|
|
31851
|
+
} else {
|
|
31852
|
+
eventOffset = e.pageX;
|
|
31853
|
+
}
|
|
31854
|
+
var dragPos = eventOffset - ((_h = (_g = track.rect) === null || _g === void 0 ? void 0 : _g[_this.axis[_this.draggedAxis].offsetAttr]) !== null && _h !== void 0 ? _h : 0) - _this.axis[_this.draggedAxis].dragOffset;
|
|
31855
|
+
dragPos = _this.draggedAxis === "x" && _this.isRtl ? ((_k = (_j = track.rect) === null || _j === void 0 ? void 0 : _j[_this.axis[_this.draggedAxis].sizeAttr]) !== null && _k !== void 0 ? _k : 0) - scrollbar.size - dragPos : dragPos;
|
|
31856
|
+
var dragPerc = dragPos / (trackSize - scrollbar.size);
|
|
31857
|
+
var scrollPos = dragPerc * (contentSize - hostSize);
|
|
31858
|
+
if (_this.draggedAxis === "x" && _this.isRtl) {
|
|
31859
|
+
scrollPos = ((_l = SimpleBarCore2.getRtlHelpers()) === null || _l === void 0 ? void 0 : _l.isScrollingToNegative) ? -scrollPos : scrollPos;
|
|
31860
|
+
}
|
|
31861
|
+
_this.contentWrapperEl[_this.axis[_this.draggedAxis].scrollOffsetAttr] = scrollPos;
|
|
31862
|
+
};
|
|
31863
|
+
this.onEndDrag = function(e) {
|
|
31864
|
+
_this.isDragging = false;
|
|
31865
|
+
var elDocument = getElementDocument(_this.el);
|
|
31866
|
+
var elWindow = getElementWindow(_this.el);
|
|
31867
|
+
e.preventDefault();
|
|
31868
|
+
e.stopPropagation();
|
|
31869
|
+
removeClasses(_this.el, _this.classNames.dragging);
|
|
31870
|
+
_this.onStopScrolling();
|
|
31871
|
+
elDocument.removeEventListener("mousemove", _this.drag, true);
|
|
31872
|
+
elDocument.removeEventListener("mouseup", _this.onEndDrag, true);
|
|
31873
|
+
_this.removePreventClickId = elWindow.setTimeout(function() {
|
|
31874
|
+
elDocument.removeEventListener("click", _this.preventClick, true);
|
|
31875
|
+
elDocument.removeEventListener("dblclick", _this.preventClick, true);
|
|
31876
|
+
_this.removePreventClickId = null;
|
|
31877
|
+
});
|
|
31878
|
+
};
|
|
31879
|
+
this.preventClick = function(e) {
|
|
31880
|
+
e.preventDefault();
|
|
31881
|
+
e.stopPropagation();
|
|
31882
|
+
};
|
|
31883
|
+
this.el = element;
|
|
31884
|
+
this.options = __assign(__assign({}, SimpleBarCore2.defaultOptions), options);
|
|
31885
|
+
this.classNames = __assign(__assign({}, SimpleBarCore2.defaultOptions.classNames), options.classNames);
|
|
31886
|
+
this.axis = {
|
|
31887
|
+
x: {
|
|
31888
|
+
scrollOffsetAttr: "scrollLeft",
|
|
31889
|
+
sizeAttr: "width",
|
|
31890
|
+
scrollSizeAttr: "scrollWidth",
|
|
31891
|
+
offsetSizeAttr: "offsetWidth",
|
|
31892
|
+
offsetAttr: "left",
|
|
31893
|
+
overflowAttr: "overflowX",
|
|
31894
|
+
dragOffset: 0,
|
|
31895
|
+
isOverflowing: true,
|
|
31896
|
+
forceVisible: false,
|
|
31897
|
+
track: { size: null, el: null, rect: null, isVisible: false },
|
|
31898
|
+
scrollbar: { size: null, el: null, rect: null, isVisible: false }
|
|
31899
|
+
},
|
|
31900
|
+
y: {
|
|
31901
|
+
scrollOffsetAttr: "scrollTop",
|
|
31902
|
+
sizeAttr: "height",
|
|
31903
|
+
scrollSizeAttr: "scrollHeight",
|
|
31904
|
+
offsetSizeAttr: "offsetHeight",
|
|
31905
|
+
offsetAttr: "top",
|
|
31906
|
+
overflowAttr: "overflowY",
|
|
31907
|
+
dragOffset: 0,
|
|
31908
|
+
isOverflowing: true,
|
|
31909
|
+
forceVisible: false,
|
|
31910
|
+
track: { size: null, el: null, rect: null, isVisible: false },
|
|
31911
|
+
scrollbar: { size: null, el: null, rect: null, isVisible: false }
|
|
31912
|
+
}
|
|
31913
|
+
};
|
|
31914
|
+
if (typeof this.el !== "object" || !this.el.nodeName) {
|
|
31915
|
+
throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));
|
|
31916
|
+
}
|
|
31917
|
+
this.onMouseMove = throttle(this._onMouseMove, 64);
|
|
31918
|
+
this.onWindowResize = debounce(this._onWindowResize, 64, { leading: true });
|
|
31919
|
+
this.onStopScrolling = debounce(this._onStopScrolling, this.stopScrollDelay);
|
|
31920
|
+
this.onMouseEntered = debounce(this._onMouseEntered, this.stopScrollDelay);
|
|
31921
|
+
this.init();
|
|
31922
|
+
}
|
|
31923
|
+
SimpleBarCore2.getRtlHelpers = function() {
|
|
31924
|
+
if (SimpleBarCore2.rtlHelpers) {
|
|
31925
|
+
return SimpleBarCore2.rtlHelpers;
|
|
31926
|
+
}
|
|
31927
|
+
var dummyDiv = document.createElement("div");
|
|
31928
|
+
dummyDiv.innerHTML = '<div class="simplebar-dummy-scrollbar-size"><div></div></div>';
|
|
31929
|
+
var scrollbarDummyEl = dummyDiv.firstElementChild;
|
|
31930
|
+
var dummyChild = scrollbarDummyEl === null || scrollbarDummyEl === void 0 ? void 0 : scrollbarDummyEl.firstElementChild;
|
|
31931
|
+
if (!dummyChild)
|
|
31932
|
+
return null;
|
|
31933
|
+
document.body.appendChild(scrollbarDummyEl);
|
|
31934
|
+
scrollbarDummyEl.scrollLeft = 0;
|
|
31935
|
+
var dummyContainerOffset = SimpleBarCore2.getOffset(scrollbarDummyEl);
|
|
31936
|
+
var dummyChildOffset = SimpleBarCore2.getOffset(dummyChild);
|
|
31937
|
+
scrollbarDummyEl.scrollLeft = -999;
|
|
31938
|
+
var dummyChildOffsetAfterScroll = SimpleBarCore2.getOffset(dummyChild);
|
|
31939
|
+
document.body.removeChild(scrollbarDummyEl);
|
|
31940
|
+
SimpleBarCore2.rtlHelpers = {
|
|
31941
|
+
// determines if the scrolling is responding with negative values
|
|
31942
|
+
isScrollOriginAtZero: dummyContainerOffset.left !== dummyChildOffset.left,
|
|
31943
|
+
// determines if the origin scrollbar position is inverted or not (positioned on left or right)
|
|
31944
|
+
isScrollingToNegative: dummyChildOffset.left !== dummyChildOffsetAfterScroll.left
|
|
31945
|
+
};
|
|
31946
|
+
return SimpleBarCore2.rtlHelpers;
|
|
31947
|
+
};
|
|
31948
|
+
SimpleBarCore2.prototype.getScrollbarWidth = function() {
|
|
31949
|
+
try {
|
|
31950
|
+
if (this.contentWrapperEl && getComputedStyle(this.contentWrapperEl, "::-webkit-scrollbar").display === "none" || "scrollbarWidth" in document.documentElement.style || "-ms-overflow-style" in document.documentElement.style) {
|
|
31951
|
+
return 0;
|
|
31952
|
+
} else {
|
|
31953
|
+
return scrollbarWidth();
|
|
31954
|
+
}
|
|
31955
|
+
} catch (e) {
|
|
31956
|
+
return scrollbarWidth();
|
|
31957
|
+
}
|
|
31958
|
+
};
|
|
31959
|
+
SimpleBarCore2.getOffset = function(el) {
|
|
31960
|
+
var rect = el.getBoundingClientRect();
|
|
31961
|
+
var elDocument = getElementDocument(el);
|
|
31962
|
+
var elWindow = getElementWindow(el);
|
|
31963
|
+
return {
|
|
31964
|
+
top: rect.top + (elWindow.pageYOffset || elDocument.documentElement.scrollTop),
|
|
31965
|
+
left: rect.left + (elWindow.pageXOffset || elDocument.documentElement.scrollLeft)
|
|
31966
|
+
};
|
|
31967
|
+
};
|
|
31968
|
+
SimpleBarCore2.prototype.init = function() {
|
|
31969
|
+
if (canUseDOM$1) {
|
|
31970
|
+
this.initDOM();
|
|
31971
|
+
this.rtlHelpers = SimpleBarCore2.getRtlHelpers();
|
|
31972
|
+
this.scrollbarWidth = this.getScrollbarWidth();
|
|
31973
|
+
this.recalculate();
|
|
31974
|
+
this.initListeners();
|
|
31975
|
+
}
|
|
31976
|
+
};
|
|
31977
|
+
SimpleBarCore2.prototype.initDOM = function() {
|
|
31978
|
+
var _a2, _b2;
|
|
31979
|
+
this.wrapperEl = this.el.querySelector(classNamesToQuery(this.classNames.wrapper));
|
|
31980
|
+
this.contentWrapperEl = this.options.scrollableNode || this.el.querySelector(classNamesToQuery(this.classNames.contentWrapper));
|
|
31981
|
+
this.contentEl = this.options.contentNode || this.el.querySelector(classNamesToQuery(this.classNames.contentEl));
|
|
31982
|
+
this.offsetEl = this.el.querySelector(classNamesToQuery(this.classNames.offset));
|
|
31983
|
+
this.maskEl = this.el.querySelector(classNamesToQuery(this.classNames.mask));
|
|
31984
|
+
this.placeholderEl = this.findChild(this.wrapperEl, classNamesToQuery(this.classNames.placeholder));
|
|
31985
|
+
this.heightAutoObserverWrapperEl = this.el.querySelector(classNamesToQuery(this.classNames.heightAutoObserverWrapperEl));
|
|
31986
|
+
this.heightAutoObserverEl = this.el.querySelector(classNamesToQuery(this.classNames.heightAutoObserverEl));
|
|
31987
|
+
this.axis.x.track.el = this.findChild(this.el, "".concat(classNamesToQuery(this.classNames.track)).concat(classNamesToQuery(this.classNames.horizontal)));
|
|
31988
|
+
this.axis.y.track.el = this.findChild(this.el, "".concat(classNamesToQuery(this.classNames.track)).concat(classNamesToQuery(this.classNames.vertical)));
|
|
31989
|
+
this.axis.x.scrollbar.el = ((_a2 = this.axis.x.track.el) === null || _a2 === void 0 ? void 0 : _a2.querySelector(classNamesToQuery(this.classNames.scrollbar))) || null;
|
|
31990
|
+
this.axis.y.scrollbar.el = ((_b2 = this.axis.y.track.el) === null || _b2 === void 0 ? void 0 : _b2.querySelector(classNamesToQuery(this.classNames.scrollbar))) || null;
|
|
31991
|
+
if (!this.options.autoHide) {
|
|
31992
|
+
addClasses$2(this.axis.x.scrollbar.el, this.classNames.visible);
|
|
31993
|
+
addClasses$2(this.axis.y.scrollbar.el, this.classNames.visible);
|
|
31994
|
+
}
|
|
31995
|
+
};
|
|
31996
|
+
SimpleBarCore2.prototype.initListeners = function() {
|
|
31997
|
+
var _this = this;
|
|
31998
|
+
var _a2;
|
|
31999
|
+
var elWindow = getElementWindow(this.el);
|
|
32000
|
+
this.el.addEventListener("mouseenter", this.onMouseEnter);
|
|
32001
|
+
this.el.addEventListener("pointerdown", this.onPointerEvent, true);
|
|
32002
|
+
this.el.addEventListener("mousemove", this.onMouseMove);
|
|
32003
|
+
this.el.addEventListener("mouseleave", this.onMouseLeave);
|
|
32004
|
+
(_a2 = this.contentWrapperEl) === null || _a2 === void 0 ? void 0 : _a2.addEventListener("scroll", this.onScroll);
|
|
32005
|
+
elWindow.addEventListener("resize", this.onWindowResize);
|
|
32006
|
+
if (!this.contentEl)
|
|
32007
|
+
return;
|
|
32008
|
+
if (window.ResizeObserver) {
|
|
32009
|
+
var resizeObserverStarted_1 = false;
|
|
32010
|
+
var resizeObserver = elWindow.ResizeObserver || ResizeObserver;
|
|
32011
|
+
this.resizeObserver = new resizeObserver(function() {
|
|
32012
|
+
if (!resizeObserverStarted_1)
|
|
32013
|
+
return;
|
|
32014
|
+
elWindow.requestAnimationFrame(function() {
|
|
32015
|
+
_this.recalculate();
|
|
32016
|
+
});
|
|
32017
|
+
});
|
|
32018
|
+
this.resizeObserver.observe(this.el);
|
|
32019
|
+
this.resizeObserver.observe(this.contentEl);
|
|
32020
|
+
elWindow.requestAnimationFrame(function() {
|
|
32021
|
+
resizeObserverStarted_1 = true;
|
|
32022
|
+
});
|
|
32023
|
+
}
|
|
32024
|
+
this.mutationObserver = new elWindow.MutationObserver(function() {
|
|
32025
|
+
elWindow.requestAnimationFrame(function() {
|
|
32026
|
+
_this.recalculate();
|
|
32027
|
+
});
|
|
32028
|
+
});
|
|
32029
|
+
this.mutationObserver.observe(this.contentEl, {
|
|
32030
|
+
childList: true,
|
|
32031
|
+
subtree: true,
|
|
32032
|
+
characterData: true
|
|
32033
|
+
});
|
|
32034
|
+
};
|
|
32035
|
+
SimpleBarCore2.prototype.recalculate = function() {
|
|
32036
|
+
if (!this.heightAutoObserverEl || !this.contentEl || !this.contentWrapperEl || !this.wrapperEl || !this.placeholderEl)
|
|
32037
|
+
return;
|
|
32038
|
+
var elWindow = getElementWindow(this.el);
|
|
32039
|
+
this.elStyles = elWindow.getComputedStyle(this.el);
|
|
32040
|
+
this.isRtl = this.elStyles.direction === "rtl";
|
|
32041
|
+
var contentElOffsetWidth = this.contentEl.offsetWidth;
|
|
32042
|
+
var isHeightAuto = this.heightAutoObserverEl.offsetHeight <= 1;
|
|
32043
|
+
var isWidthAuto = this.heightAutoObserverEl.offsetWidth <= 1 || contentElOffsetWidth > 0;
|
|
32044
|
+
var contentWrapperElOffsetWidth = this.contentWrapperEl.offsetWidth;
|
|
32045
|
+
var elOverflowX = this.elStyles.overflowX;
|
|
32046
|
+
var elOverflowY = this.elStyles.overflowY;
|
|
32047
|
+
this.contentEl.style.padding = "".concat(this.elStyles.paddingTop, " ").concat(this.elStyles.paddingRight, " ").concat(this.elStyles.paddingBottom, " ").concat(this.elStyles.paddingLeft);
|
|
32048
|
+
this.wrapperEl.style.margin = "-".concat(this.elStyles.paddingTop, " -").concat(this.elStyles.paddingRight, " -").concat(this.elStyles.paddingBottom, " -").concat(this.elStyles.paddingLeft);
|
|
32049
|
+
var contentElScrollHeight = this.contentEl.scrollHeight;
|
|
32050
|
+
var contentElScrollWidth = this.contentEl.scrollWidth;
|
|
32051
|
+
this.contentWrapperEl.style.height = isHeightAuto ? "auto" : "100%";
|
|
32052
|
+
this.placeholderEl.style.width = isWidthAuto ? "".concat(contentElOffsetWidth || contentElScrollWidth, "px") : "auto";
|
|
32053
|
+
this.placeholderEl.style.height = "".concat(contentElScrollHeight, "px");
|
|
32054
|
+
var contentWrapperElOffsetHeight = this.contentWrapperEl.offsetHeight;
|
|
32055
|
+
this.axis.x.isOverflowing = contentElOffsetWidth !== 0 && contentElScrollWidth > contentElOffsetWidth;
|
|
32056
|
+
this.axis.y.isOverflowing = contentElScrollHeight > contentWrapperElOffsetHeight;
|
|
32057
|
+
this.axis.x.isOverflowing = elOverflowX === "hidden" ? false : this.axis.x.isOverflowing;
|
|
32058
|
+
this.axis.y.isOverflowing = elOverflowY === "hidden" ? false : this.axis.y.isOverflowing;
|
|
32059
|
+
this.axis.x.forceVisible = this.options.forceVisible === "x" || this.options.forceVisible === true;
|
|
32060
|
+
this.axis.y.forceVisible = this.options.forceVisible === "y" || this.options.forceVisible === true;
|
|
32061
|
+
this.hideNativeScrollbar();
|
|
32062
|
+
var offsetForXScrollbar = this.axis.x.isOverflowing ? this.scrollbarWidth : 0;
|
|
32063
|
+
var offsetForYScrollbar = this.axis.y.isOverflowing ? this.scrollbarWidth : 0;
|
|
32064
|
+
this.axis.x.isOverflowing = this.axis.x.isOverflowing && contentElScrollWidth > contentWrapperElOffsetWidth - offsetForYScrollbar;
|
|
32065
|
+
this.axis.y.isOverflowing = this.axis.y.isOverflowing && contentElScrollHeight > contentWrapperElOffsetHeight - offsetForXScrollbar;
|
|
32066
|
+
this.axis.x.scrollbar.size = this.getScrollbarSize("x");
|
|
32067
|
+
this.axis.y.scrollbar.size = this.getScrollbarSize("y");
|
|
32068
|
+
if (this.axis.x.scrollbar.el)
|
|
32069
|
+
this.axis.x.scrollbar.el.style.width = "".concat(this.axis.x.scrollbar.size, "px");
|
|
32070
|
+
if (this.axis.y.scrollbar.el)
|
|
32071
|
+
this.axis.y.scrollbar.el.style.height = "".concat(this.axis.y.scrollbar.size, "px");
|
|
32072
|
+
this.positionScrollbar("x");
|
|
32073
|
+
this.positionScrollbar("y");
|
|
32074
|
+
this.toggleTrackVisibility("x");
|
|
32075
|
+
this.toggleTrackVisibility("y");
|
|
32076
|
+
};
|
|
32077
|
+
SimpleBarCore2.prototype.getScrollbarSize = function(axis) {
|
|
32078
|
+
var _a2, _b2;
|
|
32079
|
+
if (axis === void 0) {
|
|
32080
|
+
axis = "y";
|
|
32081
|
+
}
|
|
32082
|
+
if (!this.axis[axis].isOverflowing || !this.contentEl) {
|
|
32083
|
+
return 0;
|
|
32084
|
+
}
|
|
32085
|
+
var contentSize = this.contentEl[this.axis[axis].scrollSizeAttr];
|
|
32086
|
+
var trackSize = (_b2 = (_a2 = this.axis[axis].track.el) === null || _a2 === void 0 ? void 0 : _a2[this.axis[axis].offsetSizeAttr]) !== null && _b2 !== void 0 ? _b2 : 0;
|
|
32087
|
+
var scrollbarRatio = trackSize / contentSize;
|
|
32088
|
+
var scrollbarSize;
|
|
32089
|
+
scrollbarSize = Math.max(~~(scrollbarRatio * trackSize), this.options.scrollbarMinSize);
|
|
32090
|
+
if (this.options.scrollbarMaxSize) {
|
|
32091
|
+
scrollbarSize = Math.min(scrollbarSize, this.options.scrollbarMaxSize);
|
|
32092
|
+
}
|
|
32093
|
+
return scrollbarSize;
|
|
32094
|
+
};
|
|
32095
|
+
SimpleBarCore2.prototype.positionScrollbar = function(axis) {
|
|
32096
|
+
var _a2, _b2, _c;
|
|
32097
|
+
if (axis === void 0) {
|
|
32098
|
+
axis = "y";
|
|
32099
|
+
}
|
|
32100
|
+
var scrollbar = this.axis[axis].scrollbar;
|
|
32101
|
+
if (!this.axis[axis].isOverflowing || !this.contentWrapperEl || !scrollbar.el || !this.elStyles) {
|
|
32102
|
+
return;
|
|
32103
|
+
}
|
|
32104
|
+
var contentSize = this.contentWrapperEl[this.axis[axis].scrollSizeAttr];
|
|
32105
|
+
var trackSize = ((_a2 = this.axis[axis].track.el) === null || _a2 === void 0 ? void 0 : _a2[this.axis[axis].offsetSizeAttr]) || 0;
|
|
32106
|
+
var hostSize = parseInt(this.elStyles[this.axis[axis].sizeAttr], 10);
|
|
32107
|
+
var scrollOffset = this.contentWrapperEl[this.axis[axis].scrollOffsetAttr];
|
|
32108
|
+
scrollOffset = axis === "x" && this.isRtl && ((_b2 = SimpleBarCore2.getRtlHelpers()) === null || _b2 === void 0 ? void 0 : _b2.isScrollOriginAtZero) ? -scrollOffset : scrollOffset;
|
|
32109
|
+
if (axis === "x" && this.isRtl) {
|
|
32110
|
+
scrollOffset = ((_c = SimpleBarCore2.getRtlHelpers()) === null || _c === void 0 ? void 0 : _c.isScrollingToNegative) ? scrollOffset : -scrollOffset;
|
|
32111
|
+
}
|
|
32112
|
+
var scrollPourcent = scrollOffset / (contentSize - hostSize);
|
|
32113
|
+
var handleOffset = ~~((trackSize - scrollbar.size) * scrollPourcent);
|
|
32114
|
+
handleOffset = axis === "x" && this.isRtl ? -handleOffset + (trackSize - scrollbar.size) : handleOffset;
|
|
32115
|
+
scrollbar.el.style.transform = axis === "x" ? "translate3d(".concat(handleOffset, "px, 0, 0)") : "translate3d(0, ".concat(handleOffset, "px, 0)");
|
|
32116
|
+
};
|
|
32117
|
+
SimpleBarCore2.prototype.toggleTrackVisibility = function(axis) {
|
|
32118
|
+
if (axis === void 0) {
|
|
32119
|
+
axis = "y";
|
|
32120
|
+
}
|
|
32121
|
+
var track = this.axis[axis].track.el;
|
|
32122
|
+
var scrollbar = this.axis[axis].scrollbar.el;
|
|
32123
|
+
if (!track || !scrollbar || !this.contentWrapperEl)
|
|
32124
|
+
return;
|
|
32125
|
+
if (this.axis[axis].isOverflowing || this.axis[axis].forceVisible) {
|
|
32126
|
+
track.style.visibility = "visible";
|
|
32127
|
+
this.contentWrapperEl.style[this.axis[axis].overflowAttr] = "scroll";
|
|
32128
|
+
this.el.classList.add("".concat(this.classNames.scrollable, "-").concat(axis));
|
|
32129
|
+
} else {
|
|
32130
|
+
track.style.visibility = "hidden";
|
|
32131
|
+
this.contentWrapperEl.style[this.axis[axis].overflowAttr] = "hidden";
|
|
32132
|
+
this.el.classList.remove("".concat(this.classNames.scrollable, "-").concat(axis));
|
|
32133
|
+
}
|
|
32134
|
+
if (this.axis[axis].isOverflowing) {
|
|
32135
|
+
scrollbar.style.display = "block";
|
|
32136
|
+
} else {
|
|
32137
|
+
scrollbar.style.display = "none";
|
|
32138
|
+
}
|
|
32139
|
+
};
|
|
32140
|
+
SimpleBarCore2.prototype.showScrollbar = function(axis) {
|
|
32141
|
+
if (axis === void 0) {
|
|
32142
|
+
axis = "y";
|
|
32143
|
+
}
|
|
32144
|
+
if (this.axis[axis].isOverflowing && !this.axis[axis].scrollbar.isVisible) {
|
|
32145
|
+
addClasses$2(this.axis[axis].scrollbar.el, this.classNames.visible);
|
|
32146
|
+
this.axis[axis].scrollbar.isVisible = true;
|
|
32147
|
+
}
|
|
32148
|
+
};
|
|
32149
|
+
SimpleBarCore2.prototype.hideScrollbar = function(axis) {
|
|
32150
|
+
if (axis === void 0) {
|
|
32151
|
+
axis = "y";
|
|
32152
|
+
}
|
|
32153
|
+
if (this.isDragging)
|
|
32154
|
+
return;
|
|
32155
|
+
if (this.axis[axis].isOverflowing && this.axis[axis].scrollbar.isVisible) {
|
|
32156
|
+
removeClasses(this.axis[axis].scrollbar.el, this.classNames.visible);
|
|
32157
|
+
this.axis[axis].scrollbar.isVisible = false;
|
|
32158
|
+
}
|
|
32159
|
+
};
|
|
32160
|
+
SimpleBarCore2.prototype.hideNativeScrollbar = function() {
|
|
32161
|
+
if (!this.offsetEl)
|
|
32162
|
+
return;
|
|
32163
|
+
this.offsetEl.style[this.isRtl ? "left" : "right"] = this.axis.y.isOverflowing || this.axis.y.forceVisible ? "-".concat(this.scrollbarWidth, "px") : "0px";
|
|
32164
|
+
this.offsetEl.style.bottom = this.axis.x.isOverflowing || this.axis.x.forceVisible ? "-".concat(this.scrollbarWidth, "px") : "0px";
|
|
32165
|
+
};
|
|
32166
|
+
SimpleBarCore2.prototype.onMouseMoveForAxis = function(axis) {
|
|
32167
|
+
if (axis === void 0) {
|
|
32168
|
+
axis = "y";
|
|
32169
|
+
}
|
|
32170
|
+
var currentAxis = this.axis[axis];
|
|
32171
|
+
if (!currentAxis.track.el || !currentAxis.scrollbar.el)
|
|
32172
|
+
return;
|
|
32173
|
+
currentAxis.track.rect = currentAxis.track.el.getBoundingClientRect();
|
|
32174
|
+
currentAxis.scrollbar.rect = currentAxis.scrollbar.el.getBoundingClientRect();
|
|
32175
|
+
if (this.isWithinBounds(currentAxis.track.rect)) {
|
|
32176
|
+
this.showScrollbar(axis);
|
|
32177
|
+
addClasses$2(currentAxis.track.el, this.classNames.hover);
|
|
32178
|
+
if (this.isWithinBounds(currentAxis.scrollbar.rect)) {
|
|
32179
|
+
addClasses$2(currentAxis.scrollbar.el, this.classNames.hover);
|
|
32180
|
+
} else {
|
|
32181
|
+
removeClasses(currentAxis.scrollbar.el, this.classNames.hover);
|
|
32182
|
+
}
|
|
32183
|
+
} else {
|
|
32184
|
+
removeClasses(currentAxis.track.el, this.classNames.hover);
|
|
32185
|
+
if (this.options.autoHide) {
|
|
32186
|
+
this.hideScrollbar(axis);
|
|
32187
|
+
}
|
|
32188
|
+
}
|
|
32189
|
+
};
|
|
32190
|
+
SimpleBarCore2.prototype.onMouseLeaveForAxis = function(axis) {
|
|
32191
|
+
if (axis === void 0) {
|
|
32192
|
+
axis = "y";
|
|
32193
|
+
}
|
|
32194
|
+
removeClasses(this.axis[axis].track.el, this.classNames.hover);
|
|
32195
|
+
removeClasses(this.axis[axis].scrollbar.el, this.classNames.hover);
|
|
32196
|
+
if (this.options.autoHide) {
|
|
32197
|
+
this.hideScrollbar(axis);
|
|
32198
|
+
}
|
|
32199
|
+
};
|
|
32200
|
+
SimpleBarCore2.prototype.onDragStart = function(e, axis) {
|
|
32201
|
+
var _a2;
|
|
32202
|
+
if (axis === void 0) {
|
|
32203
|
+
axis = "y";
|
|
32204
|
+
}
|
|
32205
|
+
this.isDragging = true;
|
|
32206
|
+
var elDocument = getElementDocument(this.el);
|
|
32207
|
+
var elWindow = getElementWindow(this.el);
|
|
32208
|
+
var scrollbar = this.axis[axis].scrollbar;
|
|
32209
|
+
var eventOffset = axis === "y" ? e.pageY : e.pageX;
|
|
32210
|
+
this.axis[axis].dragOffset = eventOffset - (((_a2 = scrollbar.rect) === null || _a2 === void 0 ? void 0 : _a2[this.axis[axis].offsetAttr]) || 0);
|
|
32211
|
+
this.draggedAxis = axis;
|
|
32212
|
+
addClasses$2(this.el, this.classNames.dragging);
|
|
32213
|
+
elDocument.addEventListener("mousemove", this.drag, true);
|
|
32214
|
+
elDocument.addEventListener("mouseup", this.onEndDrag, true);
|
|
32215
|
+
if (this.removePreventClickId === null) {
|
|
32216
|
+
elDocument.addEventListener("click", this.preventClick, true);
|
|
32217
|
+
elDocument.addEventListener("dblclick", this.preventClick, true);
|
|
32218
|
+
} else {
|
|
32219
|
+
elWindow.clearTimeout(this.removePreventClickId);
|
|
32220
|
+
this.removePreventClickId = null;
|
|
32221
|
+
}
|
|
32222
|
+
};
|
|
32223
|
+
SimpleBarCore2.prototype.onTrackClick = function(e, axis) {
|
|
32224
|
+
var _this = this;
|
|
32225
|
+
var _a2, _b2, _c, _d;
|
|
32226
|
+
if (axis === void 0) {
|
|
32227
|
+
axis = "y";
|
|
32228
|
+
}
|
|
32229
|
+
var currentAxis = this.axis[axis];
|
|
32230
|
+
if (!this.options.clickOnTrack || !currentAxis.scrollbar.el || !this.contentWrapperEl)
|
|
32231
|
+
return;
|
|
32232
|
+
e.preventDefault();
|
|
32233
|
+
var elWindow = getElementWindow(this.el);
|
|
32234
|
+
this.axis[axis].scrollbar.rect = currentAxis.scrollbar.el.getBoundingClientRect();
|
|
32235
|
+
var scrollbar = this.axis[axis].scrollbar;
|
|
32236
|
+
var scrollbarOffset = (_b2 = (_a2 = scrollbar.rect) === null || _a2 === void 0 ? void 0 : _a2[this.axis[axis].offsetAttr]) !== null && _b2 !== void 0 ? _b2 : 0;
|
|
32237
|
+
var hostSize = parseInt((_d = (_c = this.elStyles) === null || _c === void 0 ? void 0 : _c[this.axis[axis].sizeAttr]) !== null && _d !== void 0 ? _d : "0px", 10);
|
|
32238
|
+
var scrolled = this.contentWrapperEl[this.axis[axis].scrollOffsetAttr];
|
|
32239
|
+
var t = axis === "y" ? this.mouseY - scrollbarOffset : this.mouseX - scrollbarOffset;
|
|
32240
|
+
var dir = t < 0 ? -1 : 1;
|
|
32241
|
+
var scrollSize = dir === -1 ? scrolled - hostSize : scrolled + hostSize;
|
|
32242
|
+
var speed = 40;
|
|
32243
|
+
var scrollTo = function() {
|
|
32244
|
+
if (!_this.contentWrapperEl)
|
|
32245
|
+
return;
|
|
32246
|
+
if (dir === -1) {
|
|
32247
|
+
if (scrolled > scrollSize) {
|
|
32248
|
+
scrolled -= speed;
|
|
32249
|
+
_this.contentWrapperEl[_this.axis[axis].scrollOffsetAttr] = scrolled;
|
|
32250
|
+
elWindow.requestAnimationFrame(scrollTo);
|
|
32251
|
+
}
|
|
32252
|
+
} else {
|
|
32253
|
+
if (scrolled < scrollSize) {
|
|
32254
|
+
scrolled += speed;
|
|
32255
|
+
_this.contentWrapperEl[_this.axis[axis].scrollOffsetAttr] = scrolled;
|
|
32256
|
+
elWindow.requestAnimationFrame(scrollTo);
|
|
32257
|
+
}
|
|
32258
|
+
}
|
|
32259
|
+
};
|
|
32260
|
+
scrollTo();
|
|
32261
|
+
};
|
|
32262
|
+
SimpleBarCore2.prototype.getContentElement = function() {
|
|
32263
|
+
return this.contentEl;
|
|
32264
|
+
};
|
|
32265
|
+
SimpleBarCore2.prototype.getScrollElement = function() {
|
|
32266
|
+
return this.contentWrapperEl;
|
|
32267
|
+
};
|
|
32268
|
+
SimpleBarCore2.prototype.removeListeners = function() {
|
|
32269
|
+
var elWindow = getElementWindow(this.el);
|
|
32270
|
+
this.el.removeEventListener("mouseenter", this.onMouseEnter);
|
|
32271
|
+
this.el.removeEventListener("pointerdown", this.onPointerEvent, true);
|
|
32272
|
+
this.el.removeEventListener("mousemove", this.onMouseMove);
|
|
32273
|
+
this.el.removeEventListener("mouseleave", this.onMouseLeave);
|
|
32274
|
+
if (this.contentWrapperEl) {
|
|
32275
|
+
this.contentWrapperEl.removeEventListener("scroll", this.onScroll);
|
|
32276
|
+
}
|
|
32277
|
+
elWindow.removeEventListener("resize", this.onWindowResize);
|
|
32278
|
+
if (this.mutationObserver) {
|
|
32279
|
+
this.mutationObserver.disconnect();
|
|
32280
|
+
}
|
|
32281
|
+
if (this.resizeObserver) {
|
|
32282
|
+
this.resizeObserver.disconnect();
|
|
32283
|
+
}
|
|
32284
|
+
this.onMouseMove.cancel();
|
|
32285
|
+
this.onWindowResize.cancel();
|
|
32286
|
+
this.onStopScrolling.cancel();
|
|
32287
|
+
this.onMouseEntered.cancel();
|
|
32288
|
+
};
|
|
32289
|
+
SimpleBarCore2.prototype.unMount = function() {
|
|
32290
|
+
this.removeListeners();
|
|
32291
|
+
};
|
|
32292
|
+
SimpleBarCore2.prototype.isWithinBounds = function(bbox) {
|
|
32293
|
+
return this.mouseX >= bbox.left && this.mouseX <= bbox.left + bbox.width && this.mouseY >= bbox.top && this.mouseY <= bbox.top + bbox.height;
|
|
32294
|
+
};
|
|
32295
|
+
SimpleBarCore2.prototype.findChild = function(el, query) {
|
|
32296
|
+
var matches = el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector;
|
|
32297
|
+
return Array.prototype.filter.call(el.children, function(child) {
|
|
32298
|
+
return matches.call(child, query);
|
|
32299
|
+
})[0];
|
|
32300
|
+
};
|
|
32301
|
+
SimpleBarCore2.rtlHelpers = null;
|
|
32302
|
+
SimpleBarCore2.defaultOptions = {
|
|
32303
|
+
forceVisible: false,
|
|
32304
|
+
clickOnTrack: true,
|
|
32305
|
+
scrollbarMinSize: 25,
|
|
32306
|
+
scrollbarMaxSize: 0,
|
|
32307
|
+
ariaLabel: "scrollable content",
|
|
32308
|
+
tabIndex: 0,
|
|
32309
|
+
classNames: {
|
|
32310
|
+
contentEl: "simplebar-content",
|
|
32311
|
+
contentWrapper: "simplebar-content-wrapper",
|
|
32312
|
+
offset: "simplebar-offset",
|
|
32313
|
+
mask: "simplebar-mask",
|
|
32314
|
+
wrapper: "simplebar-wrapper",
|
|
32315
|
+
placeholder: "simplebar-placeholder",
|
|
32316
|
+
scrollbar: "simplebar-scrollbar",
|
|
32317
|
+
track: "simplebar-track",
|
|
32318
|
+
heightAutoObserverWrapperEl: "simplebar-height-auto-observer-wrapper",
|
|
32319
|
+
heightAutoObserverEl: "simplebar-height-auto-observer",
|
|
32320
|
+
visible: "simplebar-visible",
|
|
32321
|
+
horizontal: "simplebar-horizontal",
|
|
32322
|
+
vertical: "simplebar-vertical",
|
|
32323
|
+
hover: "simplebar-hover",
|
|
32324
|
+
dragging: "simplebar-dragging",
|
|
32325
|
+
scrolling: "simplebar-scrolling",
|
|
32326
|
+
scrollable: "simplebar-scrollable",
|
|
32327
|
+
mouseEntered: "simplebar-mouse-entered"
|
|
32328
|
+
},
|
|
32329
|
+
scrollableNode: null,
|
|
32330
|
+
contentNode: null,
|
|
32331
|
+
autoHide: true
|
|
32332
|
+
};
|
|
32333
|
+
SimpleBarCore2.getOptions = getOptions$2;
|
|
32334
|
+
SimpleBarCore2.helpers = helpers;
|
|
32335
|
+
return SimpleBarCore2;
|
|
32336
|
+
})()
|
|
32337
|
+
);
|
|
32338
|
+
var extendStatics = function(d, b2) {
|
|
32339
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b3) {
|
|
32340
|
+
d2.__proto__ = b3;
|
|
32341
|
+
} || function(d2, b3) {
|
|
32342
|
+
for (var p2 in b3) if (Object.prototype.hasOwnProperty.call(b3, p2)) d2[p2] = b3[p2];
|
|
32343
|
+
};
|
|
32344
|
+
return extendStatics(d, b2);
|
|
32345
|
+
};
|
|
32346
|
+
function __extends(d, b2) {
|
|
32347
|
+
if (typeof b2 !== "function" && b2 !== null)
|
|
32348
|
+
throw new TypeError("Class extends value " + String(b2) + " is not a constructor or null");
|
|
32349
|
+
extendStatics(d, b2);
|
|
32350
|
+
function __() {
|
|
32351
|
+
this.constructor = d;
|
|
32352
|
+
}
|
|
32353
|
+
d.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __());
|
|
32354
|
+
}
|
|
32355
|
+
var _a = SimpleBarCore.helpers, getOptions = _a.getOptions, addClasses = _a.addClasses, canUseDOM = _a.canUseDOM;
|
|
32356
|
+
var SimpleBar = (
|
|
32357
|
+
/** @class */
|
|
32358
|
+
(function(_super) {
|
|
32359
|
+
__extends(SimpleBar2, _super);
|
|
32360
|
+
function SimpleBar2() {
|
|
32361
|
+
var args = [];
|
|
32362
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
32363
|
+
args[_i] = arguments[_i];
|
|
32364
|
+
}
|
|
32365
|
+
var _this = _super.apply(this, args) || this;
|
|
32366
|
+
SimpleBar2.instances.set(args[0], _this);
|
|
32367
|
+
return _this;
|
|
32368
|
+
}
|
|
32369
|
+
SimpleBar2.initDOMLoadedElements = function() {
|
|
32370
|
+
document.removeEventListener("DOMContentLoaded", this.initDOMLoadedElements);
|
|
32371
|
+
window.removeEventListener("load", this.initDOMLoadedElements);
|
|
32372
|
+
Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"), function(el) {
|
|
32373
|
+
if (el.getAttribute("data-simplebar") !== "init" && !SimpleBar2.instances.has(el))
|
|
32374
|
+
new SimpleBar2(el, getOptions(el.attributes));
|
|
32375
|
+
});
|
|
32376
|
+
};
|
|
32377
|
+
SimpleBar2.removeObserver = function() {
|
|
32378
|
+
var _a2;
|
|
32379
|
+
(_a2 = SimpleBar2.globalObserver) === null || _a2 === void 0 ? void 0 : _a2.disconnect();
|
|
32380
|
+
};
|
|
32381
|
+
SimpleBar2.prototype.initDOM = function() {
|
|
32382
|
+
var _this = this;
|
|
32383
|
+
var _a2, _b2, _c;
|
|
32384
|
+
if (!Array.prototype.filter.call(this.el.children, function(child) {
|
|
32385
|
+
return child.classList.contains(_this.classNames.wrapper);
|
|
32386
|
+
}).length) {
|
|
32387
|
+
this.wrapperEl = document.createElement("div");
|
|
32388
|
+
this.contentWrapperEl = document.createElement("div");
|
|
32389
|
+
this.offsetEl = document.createElement("div");
|
|
32390
|
+
this.maskEl = document.createElement("div");
|
|
32391
|
+
this.contentEl = document.createElement("div");
|
|
32392
|
+
this.placeholderEl = document.createElement("div");
|
|
32393
|
+
this.heightAutoObserverWrapperEl = document.createElement("div");
|
|
32394
|
+
this.heightAutoObserverEl = document.createElement("div");
|
|
32395
|
+
addClasses(this.wrapperEl, this.classNames.wrapper);
|
|
32396
|
+
addClasses(this.contentWrapperEl, this.classNames.contentWrapper);
|
|
32397
|
+
addClasses(this.offsetEl, this.classNames.offset);
|
|
32398
|
+
addClasses(this.maskEl, this.classNames.mask);
|
|
32399
|
+
addClasses(this.contentEl, this.classNames.contentEl);
|
|
32400
|
+
addClasses(this.placeholderEl, this.classNames.placeholder);
|
|
32401
|
+
addClasses(this.heightAutoObserverWrapperEl, this.classNames.heightAutoObserverWrapperEl);
|
|
32402
|
+
addClasses(this.heightAutoObserverEl, this.classNames.heightAutoObserverEl);
|
|
32403
|
+
while (this.el.firstChild) {
|
|
32404
|
+
this.contentEl.appendChild(this.el.firstChild);
|
|
32405
|
+
}
|
|
32406
|
+
this.contentWrapperEl.appendChild(this.contentEl);
|
|
32407
|
+
this.offsetEl.appendChild(this.contentWrapperEl);
|
|
32408
|
+
this.maskEl.appendChild(this.offsetEl);
|
|
32409
|
+
this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl);
|
|
32410
|
+
this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl);
|
|
32411
|
+
this.wrapperEl.appendChild(this.maskEl);
|
|
32412
|
+
this.wrapperEl.appendChild(this.placeholderEl);
|
|
32413
|
+
this.el.appendChild(this.wrapperEl);
|
|
32414
|
+
(_a2 = this.contentWrapperEl) === null || _a2 === void 0 ? void 0 : _a2.setAttribute("tabindex", this.options.tabIndex.toString());
|
|
32415
|
+
(_b2 = this.contentWrapperEl) === null || _b2 === void 0 ? void 0 : _b2.setAttribute("role", "region");
|
|
32416
|
+
(_c = this.contentWrapperEl) === null || _c === void 0 ? void 0 : _c.setAttribute("aria-label", this.options.ariaLabel);
|
|
32417
|
+
}
|
|
32418
|
+
if (!this.axis.x.track.el || !this.axis.y.track.el) {
|
|
32419
|
+
var track = document.createElement("div");
|
|
32420
|
+
var scrollbar = document.createElement("div");
|
|
32421
|
+
addClasses(track, this.classNames.track);
|
|
32422
|
+
addClasses(scrollbar, this.classNames.scrollbar);
|
|
32423
|
+
track.appendChild(scrollbar);
|
|
32424
|
+
this.axis.x.track.el = track.cloneNode(true);
|
|
32425
|
+
addClasses(this.axis.x.track.el, this.classNames.horizontal);
|
|
32426
|
+
this.axis.y.track.el = track.cloneNode(true);
|
|
32427
|
+
addClasses(this.axis.y.track.el, this.classNames.vertical);
|
|
32428
|
+
this.el.appendChild(this.axis.x.track.el);
|
|
32429
|
+
this.el.appendChild(this.axis.y.track.el);
|
|
32430
|
+
}
|
|
32431
|
+
SimpleBarCore.prototype.initDOM.call(this);
|
|
32432
|
+
this.el.setAttribute("data-simplebar", "init");
|
|
32433
|
+
};
|
|
32434
|
+
SimpleBar2.prototype.unMount = function() {
|
|
32435
|
+
SimpleBarCore.prototype.unMount.call(this);
|
|
32436
|
+
SimpleBar2.instances["delete"](this.el);
|
|
32437
|
+
};
|
|
32438
|
+
SimpleBar2.initHtmlApi = function() {
|
|
32439
|
+
this.initDOMLoadedElements = this.initDOMLoadedElements.bind(this);
|
|
32440
|
+
if (typeof MutationObserver !== "undefined") {
|
|
32441
|
+
this.globalObserver = new MutationObserver(SimpleBar2.handleMutations);
|
|
32442
|
+
this.globalObserver.observe(document, { childList: true, subtree: true });
|
|
32443
|
+
}
|
|
32444
|
+
if (document.readyState === "complete" || // @ts-ignore: IE specific
|
|
32445
|
+
document.readyState !== "loading" && !document.documentElement.doScroll) {
|
|
32446
|
+
window.setTimeout(this.initDOMLoadedElements);
|
|
32447
|
+
} else {
|
|
32448
|
+
document.addEventListener("DOMContentLoaded", this.initDOMLoadedElements);
|
|
32449
|
+
window.addEventListener("load", this.initDOMLoadedElements);
|
|
32450
|
+
}
|
|
32451
|
+
};
|
|
32452
|
+
SimpleBar2.handleMutations = function(mutations) {
|
|
32453
|
+
mutations.forEach(function(mutation) {
|
|
32454
|
+
mutation.addedNodes.forEach(function(addedNode) {
|
|
32455
|
+
if (addedNode.nodeType === 1) {
|
|
32456
|
+
if (addedNode.hasAttribute("data-simplebar")) {
|
|
32457
|
+
!SimpleBar2.instances.has(addedNode) && document.documentElement.contains(addedNode) && new SimpleBar2(addedNode, getOptions(addedNode.attributes));
|
|
32458
|
+
} else {
|
|
32459
|
+
addedNode.querySelectorAll("[data-simplebar]").forEach(function(el) {
|
|
32460
|
+
if (el.getAttribute("data-simplebar") !== "init" && !SimpleBar2.instances.has(el) && document.documentElement.contains(el))
|
|
32461
|
+
new SimpleBar2(el, getOptions(el.attributes));
|
|
32462
|
+
});
|
|
32463
|
+
}
|
|
32464
|
+
}
|
|
32465
|
+
});
|
|
32466
|
+
mutation.removedNodes.forEach(function(removedNode) {
|
|
32467
|
+
var _a2;
|
|
32468
|
+
if (removedNode.nodeType === 1) {
|
|
32469
|
+
if (removedNode.getAttribute("data-simplebar") === "init") {
|
|
32470
|
+
!document.documentElement.contains(removedNode) && ((_a2 = SimpleBar2.instances.get(removedNode)) === null || _a2 === void 0 ? void 0 : _a2.unMount());
|
|
32471
|
+
} else {
|
|
32472
|
+
Array.prototype.forEach.call(removedNode.querySelectorAll('[data-simplebar="init"]'), function(el) {
|
|
32473
|
+
var _a3;
|
|
32474
|
+
!document.documentElement.contains(el) && ((_a3 = SimpleBar2.instances.get(el)) === null || _a3 === void 0 ? void 0 : _a3.unMount());
|
|
32475
|
+
});
|
|
32476
|
+
}
|
|
32477
|
+
}
|
|
32478
|
+
});
|
|
32479
|
+
});
|
|
32480
|
+
};
|
|
32481
|
+
SimpleBar2.instances = /* @__PURE__ */ new WeakMap();
|
|
32482
|
+
return SimpleBar2;
|
|
32483
|
+
})(SimpleBarCore)
|
|
32484
|
+
);
|
|
32485
|
+
if (canUseDOM) {
|
|
32486
|
+
SimpleBar.initHtmlApi();
|
|
31339
32487
|
}
|
|
31340
32488
|
var client = {};
|
|
31341
32489
|
var hasRequiredClient;
|
|
@@ -31365,110 +32513,6 @@ function requireClient() {
|
|
|
31365
32513
|
return client;
|
|
31366
32514
|
}
|
|
31367
32515
|
var clientExports = requireClient();
|
|
31368
|
-
const TYPE = {
|
|
31369
|
-
Null: "null",
|
|
31370
|
-
Undefined: "undefined",
|
|
31371
|
-
NaN: "nan",
|
|
31372
|
-
Object: "[object Object]",
|
|
31373
|
-
Array: "[object Array]",
|
|
31374
|
-
String: "[object String]",
|
|
31375
|
-
Number: "[object Number]",
|
|
31376
|
-
Boolean: "[object Boolean]",
|
|
31377
|
-
Function: "[object Function]",
|
|
31378
|
-
AsyncFunction: "[object AsyncFunction]",
|
|
31379
|
-
RegExp: "[object RegExp]",
|
|
31380
|
-
Symbol: "[object Symbol]",
|
|
31381
|
-
Infinite: "infinite",
|
|
31382
|
-
Element: "element"
|
|
31383
|
-
};
|
|
31384
|
-
function getType(value) {
|
|
31385
|
-
if (value === void 0) {
|
|
31386
|
-
return TYPE.Undefined;
|
|
31387
|
-
}
|
|
31388
|
-
if (value === null) {
|
|
31389
|
-
return TYPE.Null;
|
|
31390
|
-
}
|
|
31391
|
-
if (value && (value.nodeType === 1 || value.nodeType === 9)) {
|
|
31392
|
-
return TYPE.Element;
|
|
31393
|
-
}
|
|
31394
|
-
const stringifiedValue = Object.prototype.toString.call(value);
|
|
31395
|
-
if (stringifiedValue === TYPE.Number) {
|
|
31396
|
-
if (Number.isNaN(value)) {
|
|
31397
|
-
return TYPE.NaN;
|
|
31398
|
-
}
|
|
31399
|
-
if (!Number.isFinite(value)) {
|
|
31400
|
-
return TYPE.Infinite;
|
|
31401
|
-
}
|
|
31402
|
-
}
|
|
31403
|
-
return stringifiedValue;
|
|
31404
|
-
}
|
|
31405
|
-
const createTypeGuard = (...types) => (value) => types.includes(getType(value));
|
|
31406
|
-
const isDefined = (value) => value != null;
|
|
31407
|
-
const isNull = createTypeGuard(TYPE.Null);
|
|
31408
|
-
const isUndefined = createTypeGuard(TYPE.Undefined);
|
|
31409
|
-
const isObject = createTypeGuard(TYPE.Object);
|
|
31410
|
-
const isArray = createTypeGuard(TYPE.Array);
|
|
31411
|
-
const isString = createTypeGuard(TYPE.String);
|
|
31412
|
-
const isNumber$1 = createTypeGuard(TYPE.Number);
|
|
31413
|
-
const isBoolean = createTypeGuard(TYPE.Boolean);
|
|
31414
|
-
const isFunction = createTypeGuard(
|
|
31415
|
-
TYPE.Function,
|
|
31416
|
-
TYPE.AsyncFunction
|
|
31417
|
-
);
|
|
31418
|
-
const isRegExp = createTypeGuard(TYPE.RegExp);
|
|
31419
|
-
const isElement = createTypeGuard(TYPE.Element);
|
|
31420
|
-
const isNaN$1 = createTypeGuard(TYPE.NaN);
|
|
31421
|
-
const isInfinite = createTypeGuard(TYPE.Infinite);
|
|
31422
|
-
const isSymbol = createTypeGuard(TYPE.Symbol);
|
|
31423
|
-
const _exports = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
31424
|
-
__proto__: null,
|
|
31425
|
-
isArray,
|
|
31426
|
-
isBoolean,
|
|
31427
|
-
isDefined,
|
|
31428
|
-
isElement,
|
|
31429
|
-
isFunction,
|
|
31430
|
-
isInfinite,
|
|
31431
|
-
isNaN: isNaN$1,
|
|
31432
|
-
isNull,
|
|
31433
|
-
isNumber: isNumber$1,
|
|
31434
|
-
isObject,
|
|
31435
|
-
isRegExp,
|
|
31436
|
-
isString,
|
|
31437
|
-
isSymbol,
|
|
31438
|
-
isUndefined
|
|
31439
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
31440
|
-
const createRef = (cfg) => {
|
|
31441
|
-
const comparer$1 = cfg?.comparer ?? comparer.default;
|
|
31442
|
-
const ref = (value) => {
|
|
31443
|
-
const nextValue = value ?? null;
|
|
31444
|
-
if (comparer$1(ref.current, nextValue)) {
|
|
31445
|
-
return;
|
|
31446
|
-
}
|
|
31447
|
-
runInAction(() => {
|
|
31448
|
-
ref.current = nextValue;
|
|
31449
|
-
ref.listeners.forEach((listener) => {
|
|
31450
|
-
listener(ref.current);
|
|
31451
|
-
});
|
|
31452
|
-
});
|
|
31453
|
-
};
|
|
31454
|
-
ref.listeners = new Set(cfg?.onChange ? [cfg.onChange] : []);
|
|
31455
|
-
if (cfg?.onSet || cfg?.onUnset) {
|
|
31456
|
-
ref.listeners.add((value) => {
|
|
31457
|
-
if (value) {
|
|
31458
|
-
cfg.onSet?.(value);
|
|
31459
|
-
} else {
|
|
31460
|
-
cfg.onUnset?.();
|
|
31461
|
-
}
|
|
31462
|
-
});
|
|
31463
|
-
}
|
|
31464
|
-
ref.current = cfg?.initial ?? null;
|
|
31465
|
-
ref.meta = cfg?.meta ?? {};
|
|
31466
|
-
makeObservable(ref, {
|
|
31467
|
-
current: observable.ref,
|
|
31468
|
-
meta: observable
|
|
31469
|
-
});
|
|
31470
|
-
return ref;
|
|
31471
|
-
};
|
|
31472
32516
|
var jsxDevRuntime = { exports: {} };
|
|
31473
32517
|
var reactJsxDevRuntime_development = {};
|
|
31474
32518
|
var hasRequiredReactJsxDevRuntime_development;
|
|
@@ -31884,7 +32928,7 @@ function requireReactJsxDevRuntime_development() {
|
|
|
31884
32928
|
}
|
|
31885
32929
|
return "";
|
|
31886
32930
|
}
|
|
31887
|
-
var
|
|
32931
|
+
var hasOwnProperty2 = Object.prototype.hasOwnProperty;
|
|
31888
32932
|
var loggedTypeFailures = {};
|
|
31889
32933
|
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
31890
32934
|
function setCurrentlyValidatingElement(element) {
|
|
@@ -31900,7 +32944,7 @@ function requireReactJsxDevRuntime_development() {
|
|
|
31900
32944
|
}
|
|
31901
32945
|
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
|
31902
32946
|
{
|
|
31903
|
-
var has = Function.call.bind(
|
|
32947
|
+
var has = Function.call.bind(hasOwnProperty2);
|
|
31904
32948
|
for (var typeSpecName in typeSpecs) {
|
|
31905
32949
|
if (has(typeSpecs, typeSpecName)) {
|
|
31906
32950
|
var error$1 = void 0;
|
|
@@ -31976,7 +33020,7 @@ function requireReactJsxDevRuntime_development() {
|
|
|
31976
33020
|
}
|
|
31977
33021
|
function hasValidRef(config) {
|
|
31978
33022
|
{
|
|
31979
|
-
if (
|
|
33023
|
+
if (hasOwnProperty2.call(config, "ref")) {
|
|
31980
33024
|
var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
|
|
31981
33025
|
if (getter && getter.isReactWarning) {
|
|
31982
33026
|
return false;
|
|
@@ -31987,7 +33031,7 @@ function requireReactJsxDevRuntime_development() {
|
|
|
31987
33031
|
}
|
|
31988
33032
|
function hasValidKey(config) {
|
|
31989
33033
|
{
|
|
31990
|
-
if (
|
|
33034
|
+
if (hasOwnProperty2.call(config, "key")) {
|
|
31991
33035
|
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
31992
33036
|
if (getter && getter.isReactWarning) {
|
|
31993
33037
|
return false;
|
|
@@ -32099,7 +33143,7 @@ function requireReactJsxDevRuntime_development() {
|
|
|
32099
33143
|
warnIfStringRefCannotBeAutoConverted(config, self2);
|
|
32100
33144
|
}
|
|
32101
33145
|
for (propName in config) {
|
|
32102
|
-
if (
|
|
33146
|
+
if (hasOwnProperty2.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
32103
33147
|
props[propName] = config[propName];
|
|
32104
33148
|
}
|
|
32105
33149
|
}
|
|
@@ -32331,7 +33375,7 @@ function requireReactJsxDevRuntime_development() {
|
|
|
32331
33375
|
}
|
|
32332
33376
|
}
|
|
32333
33377
|
{
|
|
32334
|
-
if (
|
|
33378
|
+
if (hasOwnProperty2.call(props, "key")) {
|
|
32335
33379
|
var componentName = getComponentNameFromType(type);
|
|
32336
33380
|
var keys = Object.keys(props).filter(function(k2) {
|
|
32337
33381
|
return k2 !== "key";
|
|
@@ -35334,81 +36378,150 @@ const getDefaultConfig = () => {
|
|
|
35334
36378
|
};
|
|
35335
36379
|
const twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
35336
36380
|
const cx = (...args) => twMerge(clsx(...args));
|
|
35337
|
-
const
|
|
35338
|
-
const
|
|
35339
|
-
const opened = "
|
|
35340
|
-
const isConnected = "
|
|
35341
|
-
const
|
|
35342
|
-
const vmPopup = "vmPopup_Q4l4j";
|
|
35343
|
-
const treeItemHeader = "treeItemHeader_9gR6Q";
|
|
35344
|
-
const treeItemLabel = "treeItemLabel_eiMgP";
|
|
35345
|
-
const treeItemMetaText = "treeItemMetaText_cmfX0";
|
|
35346
|
-
const treeItem = "treeItem_sRXPA";
|
|
35347
|
-
const vmTreeItem = "vmTreeItem_t-7jc";
|
|
35348
|
-
const extrasItem = "extrasItem_MI9Fa";
|
|
35349
|
-
const expandButton = "expandButton_EObqt";
|
|
35350
|
-
const expanded = "expanded_uFpb7";
|
|
35351
|
-
const disabled = "disabled_IDojS";
|
|
35352
|
-
const css$3 = {
|
|
35353
|
-
root,
|
|
36381
|
+
const vmButton = "vmButton_esipO";
|
|
36382
|
+
const dragging = "dragging_kUMCE";
|
|
36383
|
+
const opened = "opened_NYAFW";
|
|
36384
|
+
const isConnected = "isConnected_eObxX";
|
|
36385
|
+
const css$5 = {
|
|
35354
36386
|
vmButton,
|
|
36387
|
+
dragging,
|
|
35355
36388
|
opened,
|
|
35356
|
-
isConnected
|
|
35357
|
-
closePopupButton,
|
|
35358
|
-
vmPopup,
|
|
35359
|
-
treeItemHeader,
|
|
35360
|
-
treeItemLabel,
|
|
35361
|
-
treeItemMetaText,
|
|
35362
|
-
treeItem,
|
|
35363
|
-
vmTreeItem,
|
|
35364
|
-
extrasItem,
|
|
35365
|
-
expandButton,
|
|
35366
|
-
expanded,
|
|
35367
|
-
disabled
|
|
36389
|
+
isConnected
|
|
35368
36390
|
};
|
|
35369
|
-
|
|
35370
|
-
|
|
35371
|
-
|
|
35372
|
-
|
|
35373
|
-
|
|
35374
|
-
|
|
35375
|
-
|
|
35376
|
-
|
|
35377
|
-
|
|
35378
|
-
|
|
35379
|
-
|
|
35380
|
-
|
|
35381
|
-
)
|
|
35382
|
-
"
|
|
35383
|
-
|
|
35384
|
-
|
|
35385
|
-
|
|
35386
|
-
|
|
35387
|
-
|
|
35388
|
-
|
|
35389
|
-
|
|
35390
|
-
|
|
35391
|
-
|
|
35392
|
-
|
|
35393
|
-
|
|
35394
|
-
|
|
35395
|
-
|
|
35396
|
-
|
|
35397
|
-
|
|
35398
|
-
|
|
35399
|
-
|
|
35400
|
-
|
|
35401
|
-
|
|
35402
|
-
|
|
35403
|
-
|
|
35404
|
-
|
|
35405
|
-
|
|
35406
|
-
|
|
35407
|
-
|
|
35408
|
-
|
|
35409
|
-
|
|
35410
|
-
|
|
35411
|
-
}
|
|
36391
|
+
class VmDevtoolsButtonVM extends ViewModelBase {
|
|
36392
|
+
devtools = this.parentViewModel.devtools;
|
|
36393
|
+
ref = createRef({
|
|
36394
|
+
onSet: (node) => {
|
|
36395
|
+
const dragState = {
|
|
36396
|
+
isDragging: false,
|
|
36397
|
+
offsetX: 0,
|
|
36398
|
+
offsetY: 0,
|
|
36399
|
+
hasMoved: false,
|
|
36400
|
+
startX: 0,
|
|
36401
|
+
startY: 0
|
|
36402
|
+
};
|
|
36403
|
+
const { width, height } = node.getBoundingClientRect();
|
|
36404
|
+
node.addEventListener("mousedown", (e) => {
|
|
36405
|
+
dragState.isDragging = true;
|
|
36406
|
+
dragState.hasMoved = false;
|
|
36407
|
+
const rect = node.getBoundingClientRect();
|
|
36408
|
+
dragState.offsetX = rect.left - e.clientX;
|
|
36409
|
+
dragState.offsetY = rect.top - e.clientY;
|
|
36410
|
+
dragState.startX = rect.left;
|
|
36411
|
+
dragState.startY = rect.top;
|
|
36412
|
+
node.classList.add(css$5.dragging);
|
|
36413
|
+
});
|
|
36414
|
+
const handleMouseMove = (e) => {
|
|
36415
|
+
if (!dragState.isDragging) return;
|
|
36416
|
+
let x2 = e.clientX + dragState.offsetX;
|
|
36417
|
+
let y2 = e.clientY + dragState.offsetY;
|
|
36418
|
+
const minX = 12;
|
|
36419
|
+
const minY = 12;
|
|
36420
|
+
const maxX = window.innerWidth - width - 12;
|
|
36421
|
+
const maxY = window.innerHeight - height - 12;
|
|
36422
|
+
if (x2 < minX) {
|
|
36423
|
+
x2 = minX;
|
|
36424
|
+
}
|
|
36425
|
+
if (y2 < minY) {
|
|
36426
|
+
y2 = minY;
|
|
36427
|
+
}
|
|
36428
|
+
if (x2 > maxX) {
|
|
36429
|
+
x2 = maxX;
|
|
36430
|
+
}
|
|
36431
|
+
if (y2 > maxY) {
|
|
36432
|
+
y2 = maxY;
|
|
36433
|
+
}
|
|
36434
|
+
node.style.left = `${x2}px`;
|
|
36435
|
+
node.style.top = `${y2}px`;
|
|
36436
|
+
if (x2 !== dragState.startX || y2 !== dragState.startY) {
|
|
36437
|
+
dragState.hasMoved = true;
|
|
36438
|
+
}
|
|
36439
|
+
};
|
|
36440
|
+
const handleMouseUp = () => {
|
|
36441
|
+
dragState.isDragging = false;
|
|
36442
|
+
node.classList.remove(css$5.dragging);
|
|
36443
|
+
if (this.position !== this.devtools.position) {
|
|
36444
|
+
runInAction(() => {
|
|
36445
|
+
this.devtools.position = this.position;
|
|
36446
|
+
});
|
|
36447
|
+
}
|
|
36448
|
+
};
|
|
36449
|
+
node.addEventListener("click", (e) => {
|
|
36450
|
+
if (dragState.hasMoved) {
|
|
36451
|
+
e.preventDefault();
|
|
36452
|
+
e.stopPropagation();
|
|
36453
|
+
return;
|
|
36454
|
+
}
|
|
36455
|
+
this.handleClick();
|
|
36456
|
+
});
|
|
36457
|
+
document.addEventListener("mousemove", handleMouseMove);
|
|
36458
|
+
document.addEventListener("mouseup", handleMouseUp);
|
|
36459
|
+
}
|
|
36460
|
+
});
|
|
36461
|
+
handleClick = () => {
|
|
36462
|
+
if (this.devtools.isPopupOpened) {
|
|
36463
|
+
this.devtools.hidePopup();
|
|
36464
|
+
} else {
|
|
36465
|
+
this.devtools.showPopup();
|
|
36466
|
+
}
|
|
36467
|
+
};
|
|
36468
|
+
get position() {
|
|
36469
|
+
const rect = this.ref.current?.getBoundingClientRect();
|
|
36470
|
+
const centerX = window.innerWidth / 2;
|
|
36471
|
+
const centerY = window.innerHeight / 2;
|
|
36472
|
+
const isLeft = (rect?.left ?? 0) < centerX;
|
|
36473
|
+
const isTop = (rect?.top ?? 0) < centerY;
|
|
36474
|
+
if (isTop && isLeft) return "top-left";
|
|
36475
|
+
if (isTop && !isLeft) return "top-right";
|
|
36476
|
+
if (!isTop && isLeft) return "bottom-left";
|
|
36477
|
+
return "bottom-right";
|
|
36478
|
+
}
|
|
36479
|
+
}
|
|
36480
|
+
const VmDevtoolsButton = withViewModel(
|
|
36481
|
+
VmDevtoolsButtonVM,
|
|
36482
|
+
({ model }) => {
|
|
36483
|
+
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
36484
|
+
"button",
|
|
36485
|
+
{
|
|
36486
|
+
className: cx(
|
|
36487
|
+
css$5.vmButton,
|
|
36488
|
+
{
|
|
36489
|
+
[css$5.opened]: model.devtools.isPopupOpened,
|
|
36490
|
+
[css$5.isConnected]: model.devtools.isActive
|
|
36491
|
+
},
|
|
36492
|
+
model.devtools.config.buttonClassName
|
|
36493
|
+
),
|
|
36494
|
+
ref: model.ref,
|
|
36495
|
+
"data-position": model.devtools.position,
|
|
36496
|
+
children: [
|
|
36497
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("img", { src: model.devtools.logoUrl }, void 0, false, {
|
|
36498
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-button/index.tsx",
|
|
36499
|
+
lineNumber: 22,
|
|
36500
|
+
columnNumber: 9
|
|
36501
|
+
}, void 0),
|
|
36502
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("div", {}, void 0, false, {
|
|
36503
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-button/index.tsx",
|
|
36504
|
+
lineNumber: 23,
|
|
36505
|
+
columnNumber: 9
|
|
36506
|
+
}, void 0),
|
|
36507
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("span", { children: model.devtools.allVms.length }, void 0, false, {
|
|
36508
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-button/index.tsx",
|
|
36509
|
+
lineNumber: 24,
|
|
36510
|
+
columnNumber: 9
|
|
36511
|
+
}, void 0)
|
|
36512
|
+
]
|
|
36513
|
+
},
|
|
36514
|
+
void 0,
|
|
36515
|
+
true,
|
|
36516
|
+
{
|
|
36517
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-button/index.tsx",
|
|
36518
|
+
lineNumber: 10,
|
|
36519
|
+
columnNumber: 7
|
|
36520
|
+
},
|
|
36521
|
+
void 0
|
|
36522
|
+
);
|
|
36523
|
+
}
|
|
36524
|
+
);
|
|
35412
36525
|
const ChevronRight = (props) => reactExports.createElement(
|
|
35413
36526
|
"svg",
|
|
35414
36527
|
Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, fill: "none", viewBox: "0 0 16 16" }, props),
|
|
@@ -35434,6 +36547,12 @@ const Xmark = (props) => reactExports.createElement(
|
|
|
35434
36547
|
Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, fill: "none", viewBox: "0 0 16 16" }, props),
|
|
35435
36548
|
reactExports.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M3.47 3.47a.75.75 0 0 1 1.06 0L8 6.94l3.47-3.47a.75.75 0 1 1 1.06 1.06L9.06 8l3.47 3.47a.75.75 0 1 1-1.06 1.06L8 9.06l-3.47 3.47a.75.75 0 0 1-1.06-1.06L6.94 8 3.47 4.53a.75.75 0 0 1 0-1.06", clipRule: "evenodd" })
|
|
35436
36549
|
);
|
|
36550
|
+
const vmPopup = "vmPopup_0hkGL";
|
|
36551
|
+
const closePopupButton = "closePopupButton_igv9j";
|
|
36552
|
+
const css$4 = {
|
|
36553
|
+
vmPopup,
|
|
36554
|
+
closePopupButton
|
|
36555
|
+
};
|
|
35437
36556
|
const a = null, { min: u, max: h, abs: p, floor: v } = Math, g = (e, t, o) => u(o, h(t, e)), m = (e) => [...e].sort(((e2, t) => e2 - t)), _14 = "function" == typeof queueMicrotask ? queueMicrotask : (e) => {
|
|
35438
36557
|
Promise.resolve().then(e);
|
|
35439
36558
|
}, S = () => {
|
|
@@ -35451,21 +36570,21 @@ const a = null, { min: u, max: h, abs: p, floor: v } = Math, g = (e, t, o) => u(
|
|
|
35451
36570
|
}, y = (e, t) => {
|
|
35452
36571
|
const o = e.t[t];
|
|
35453
36572
|
return -1 === o ? e.o : o;
|
|
35454
|
-
},
|
|
36573
|
+
}, x = (e, t, o) => {
|
|
35455
36574
|
const n = -1 === e.t[t];
|
|
35456
36575
|
return e.t[t] = o, e.i = u(t, e.i), n;
|
|
35457
|
-
},
|
|
36576
|
+
}, z = (e, t) => {
|
|
35458
36577
|
if (!e.l) return 0;
|
|
35459
36578
|
if (e.i >= t) return e.u[t];
|
|
35460
36579
|
e.i < 0 && (e.u[0] = 0, e.i = 0);
|
|
35461
36580
|
let o = e.i, n = e.u[o];
|
|
35462
36581
|
for (; o < t; ) n += y(e, o), e.u[++o] = n;
|
|
35463
36582
|
return e.i = t, n;
|
|
35464
|
-
},
|
|
36583
|
+
}, b = (e, t, o = 0, n = e.l - 1) => {
|
|
35465
36584
|
for (; o <= n; ) {
|
|
35466
36585
|
const r2 = v((o + n) / 2);
|
|
35467
|
-
if (
|
|
35468
|
-
if (
|
|
36586
|
+
if (z(e, r2) <= t) {
|
|
36587
|
+
if (z(e, r2 + 1) > t) return r2;
|
|
35469
36588
|
o = r2 + 1;
|
|
35470
36589
|
} else n = r2 - 1;
|
|
35471
36590
|
}
|
|
@@ -35476,15 +36595,15 @@ const a = null, { min: u, max: h, abs: p, floor: v } = Math, g = (e, t, o) => u(
|
|
|
35476
36595
|
}, k = "undefined" != typeof window, R = () => document.documentElement, T = (e) => e.ownerDocument, M = (e) => e.defaultView, C = /* @__PURE__ */ w((() => !!k && "rtl" === getComputedStyle(R()).direction)), E = /* @__PURE__ */ w((() => !!/iP(hone|od|ad)/.test(navigator.userAgent) || "MacIntel" === navigator.platform && navigator.maxTouchPoints > 0)), H = /* @__PURE__ */ w((() => "scrollBehavior" in R().style)), W = (e) => h(e.h(), e.p()), O = (e, t = 40, o = 0, n, r2 = false) => {
|
|
35477
36596
|
let i = !!o, s = 1, l = 0, c = 0, f = 0, d = 0, v2 = 0, g2 = 0, _15 = 0, S2 = 0, w2 = a, k2 = [0, i ? h(o - 1, 0) : -1], R2 = 0;
|
|
35478
36597
|
const T2 = ((e2, t2, o2) => ({ o: o2 ? o2[1] : t2, t: o2 && o2[0] ? $(o2[0].slice(0, u(e2, o2[0].length)), h(0, e2 - o2[0].length)) : $([], e2), l: e2, i: -1, u: $([], e2 + 1) }))(e, t, n), M2 = /* @__PURE__ */ new Set(), C2 = () => f - c, H2 = () => C2() + v2 + d, W2 = (e2, t2) => ((e3, t3, o2, n2) => {
|
|
35479
|
-
if (n2 = u(n2, e3.l - 1),
|
|
35480
|
-
const r3 =
|
|
35481
|
-
return [
|
|
36598
|
+
if (n2 = u(n2, e3.l - 1), z(e3, n2) <= t3) {
|
|
36599
|
+
const r3 = b(e3, o2, n2);
|
|
36600
|
+
return [b(e3, t3, n2, r3), r3];
|
|
35482
36601
|
}
|
|
35483
36602
|
{
|
|
35484
|
-
const r3 =
|
|
35485
|
-
return [r3,
|
|
36603
|
+
const r3 = b(e3, t3, void 0, n2);
|
|
36604
|
+
return [r3, b(e3, o2, r3)];
|
|
35486
36605
|
}
|
|
35487
|
-
})(T2, e2, t2, k2[0]), O2 = () =>
|
|
36606
|
+
})(T2, e2, t2, k2[0]), O2 = () => z(T2, T2.l), B2 = (e2) => z(T2, e2) - v2, J2 = (e2) => y(T2, e2), A2 = (e2, t2 = -1) => T2.t[e2] === t2, L2 = (e2) => {
|
|
35488
36607
|
e2 && (E() && 0 !== _15 || w2 && 1 === S2 ? v2 += e2 : d += e2);
|
|
35489
36608
|
};
|
|
35490
36609
|
return { v: () => {
|
|
@@ -35498,7 +36617,7 @@ const a = null, { min: u, max: h, abs: p, floor: v } = Math, g = (e, t, o) => u(
|
|
|
35498
36617
|
r2 || (e2 = h(0, e2), 1 !== _15 && (n2 -= e2), 2 !== _15 && (i2 += e2)), [t2, o2] = k2 = W2(h(0, n2), h(0, i2)), w2 && (t2 = u(t2, w2[0]), o2 = h(o2, w2[1]));
|
|
35499
36618
|
}
|
|
35500
36619
|
return [h(t2, 0), u(o2, T2.l - 1)];
|
|
35501
|
-
}, $: () =>
|
|
36620
|
+
}, $: () => b(T2, H2()), I: () => b(T2, H2() + l), k: A2, R: B2, T: J2, M: () => T2.l, C: () => f, H: () => 0 !== _15, p: () => l, W: () => c, h: O2, O: () => (g2 = d, d = 0, [g2, 2 === S2]), B: (e2, t2) => {
|
|
35502
36621
|
const o2 = [e2, t2];
|
|
35503
36622
|
return M2.add(o2), () => {
|
|
35504
36623
|
M2.delete(o2);
|
|
@@ -35524,7 +36643,7 @@ const a = null, { min: u, max: h, abs: p, floor: v } = Math, g = (e, t, o) => u(
|
|
|
35524
36643
|
if (!e3.length) break;
|
|
35525
36644
|
L2(e3.reduce(((e4, [t3, o3]) => ((2 === S2 || (w2 && 1 === S2 ? t3 < w2[0] : B2(t3 + (0 === _15 && 0 === S2 ? 1 : 0)) < C2())) && (e4 += o3 - J2(t3)), e4)), 0));
|
|
35526
36645
|
for (const [t3, o3] of e3) {
|
|
35527
|
-
const e4 = J2(t3), n3 =
|
|
36646
|
+
const e4 = J2(t3), n3 = x(T2, t3, o3);
|
|
35528
36647
|
r2 && (R2 += n3 ? o3 : o3 - e4);
|
|
35529
36648
|
}
|
|
35530
36649
|
r2 && l && R2 > l && (L2(((e4, t3) => {
|
|
@@ -35535,7 +36654,7 @@ const a = null, { min: u, max: h, abs: p, floor: v } = Math, g = (e, t, o) => u(
|
|
|
35535
36654
|
})), e4.i = -1;
|
|
35536
36655
|
const r3 = m(n3), i2 = r3.length, s2 = i2 / 2 | 0, l2 = i2 % 2 == 0 ? (r3[s2 - 1] + r3[s2]) / 2 : r3[s2], c2 = e4.o;
|
|
35537
36656
|
return ((e4.o = l2) - c2) * h(t3 - o3, 0);
|
|
35538
|
-
})(T2,
|
|
36657
|
+
})(T2, b(T2, H2()))), r2 = false), u2 = 3, n2 = true;
|
|
35539
36658
|
break;
|
|
35540
36659
|
}
|
|
35541
36660
|
case 4:
|
|
@@ -35708,7 +36827,7 @@ const a = null, { min: u, max: h, abs: p, floor: v } = Math, g = (e, t, o) => u(
|
|
|
35708
36827
|
const a2 = reactExports.useRef(null);
|
|
35709
36828
|
G((() => o(a2[U], r2)), [r2]);
|
|
35710
36829
|
const u2 = reactExports.useMemo((() => {
|
|
35711
|
-
const e = { contain: "layout style", position: l && d ? void 0 : "absolute", [f ? "height" : "width"]: "100%", [f ? "top" : "left"]: 0, [f ? C() ? "right" : "left" : "top"]: s, visibility: !l || d ?
|
|
36830
|
+
const e = { contain: "layout style", position: l && d ? void 0 : "absolute", [f ? "height" : "width"]: "100%", [f ? "top" : "left"]: 0, [f ? C() ? "right" : "left" : "top"]: s, visibility: !l || d ? void 0 : "hidden" };
|
|
35712
36831
|
return f && (e.display = "inline-flex"), e;
|
|
35713
36832
|
}), [s, l, d, f]);
|
|
35714
36833
|
return jsxRuntimeExports.jsx(c, "string" == typeof c ? { ref: a2, style: u2, children: t } : { ref: a2, style: u2, index: r2, children: t });
|
|
@@ -35720,13 +36839,13 @@ const a = null, { min: u, max: h, abs: p, floor: v } = Math, g = (e, t, o) => u(
|
|
|
35720
36839
|
})(e);
|
|
35721
36840
|
return [(e2) => o[e2], o.length];
|
|
35722
36841
|
}), [e, t]), te = /* @__PURE__ */ reactExports.forwardRef((({ children: t, data: o, bufferSize: r2, itemSize: i, shift: s, horizontal: f, keepMounted: a2, cache: u2, startMargin: h2 = 0, ssrCount: p2, as: v2 = "div", item: g2 = "div", scrollRef: S2, onScroll: w2, onScrollEnd: $2 }, y2) => {
|
|
35723
|
-
const [
|
|
35724
|
-
const e = !!f, t2 = O(
|
|
36842
|
+
const [x2, z2] = ee(t, o), b2 = reactExports.useRef(null), I2 = reactExports.useRef(!!p2), k2 = Q(w2), R2 = Q($2), [T2, M2, C2, E2] = N((() => {
|
|
36843
|
+
const e = !!f, t2 = O(z2, i, p2, u2, !i);
|
|
35725
36844
|
return [t2, Y(t2, e), D(t2, e), e];
|
|
35726
36845
|
}));
|
|
35727
|
-
|
|
36846
|
+
z2 !== T2.M() && T2.J(5, [z2, s]), h2 !== T2.W() && T2.J(6, h2);
|
|
35728
36847
|
const [H2, B2] = reactExports.useReducer(T2.m, void 0, T2.m), J2 = T2.H(), A2 = T2.h(), L2 = [], P = (t2) => {
|
|
35729
|
-
const o2 =
|
|
36848
|
+
const o2 = x2(t2);
|
|
35730
36849
|
return jsxRuntimeExports.jsx(Z, { ee: M2.F, te: t2, oe: T2.R(t2), ne: T2.k(t2), re: g2, Z: o2, ie: E2, se: I2[U] }, K(o2, t2));
|
|
35731
36850
|
};
|
|
35732
36851
|
if (G((() => {
|
|
@@ -35742,7 +36861,7 @@ const a = null, { min: u, max: h, abs: p, floor: v } = Math, g = (e, t, o) => u(
|
|
|
35742
36861
|
};
|
|
35743
36862
|
return S2 ? _14((() => {
|
|
35744
36863
|
S2[U] && e(S2[U]);
|
|
35745
|
-
})) : e(
|
|
36864
|
+
})) : e(b2[U].parentElement), () => {
|
|
35746
36865
|
T2.v(), M2.v(), C2.v();
|
|
35747
36866
|
};
|
|
35748
36867
|
}), []), G((() => {
|
|
@@ -35762,83 +36881,95 @@ const a = null, { min: u, max: h, abs: p, floor: v } = Math, g = (e, t, o) => u(
|
|
|
35762
36881
|
L2.push(P(e2));
|
|
35763
36882
|
}));
|
|
35764
36883
|
} else for (let [e, t2] = T2.S(r2); e <= t2; e++) L2.push(P(e));
|
|
35765
|
-
return jsxRuntimeExports.jsx(v2, { ref:
|
|
35766
|
-
})), oe = /* @__PURE__ */ reactExports.forwardRef((({ children: t, data: o, bufferSize: r2, itemSize: i, shift: s, horizontal: l, keepMounted: c, reverse: f, cache: d, ssrCount: a2, item: u2, onScroll: h2, onScrollEnd: p2, style: v2, ...g2 }, m2) => {
|
|
35767
|
-
const _15 = reactExports.useRef(null), S2 = f && !l;
|
|
35768
|
-
let w2 = jsxRuntimeExports.jsx(te, { ref: m2, scrollRef: S2 ? _15 : void 0, data: o, bufferSize: r2, itemSize: i, shift: s, horizontal: l, keepMounted: c, cache: d, ssrCount: a2, item: u2, onScroll: h2, onScrollEnd: p2, children: t });
|
|
35769
|
-
return S2 && (w2 = jsxRuntimeExports.jsx("div", { style: { display: "flex", flexDirection: "column", justifyContent: "flex-end", minHeight: "100%", overflow: "clip" }, children: w2 })), jsxRuntimeExports.jsx("div", { ref: _15, ...g2, style: { display: l ? "inline-block" : "block", [l ? "overflowX" : "overflowY"]: "auto", contain: "strict", width: "100%", height: "100%", ...v2 }, children: w2 });
|
|
36884
|
+
return jsxRuntimeExports.jsx(v2, { ref: b2, style: { contain: "size style", overflowAnchor: "none", flex: "none", position: "relative", width: E2 ? A2 : "100%", height: E2 ? "100%" : A2, pointerEvents: J2 ? "none" : void 0 }, children: L2 });
|
|
35770
36885
|
}));
|
|
35771
|
-
|
|
35772
|
-
|
|
35773
|
-
|
|
35774
|
-
|
|
35775
|
-
|
|
35776
|
-
|
|
35777
|
-
|
|
35778
|
-
}
|
|
35779
|
-
|
|
35780
|
-
|
|
35781
|
-
|
|
35782
|
-
|
|
35783
|
-
|
|
35784
|
-
|
|
35785
|
-
|
|
35786
|
-
|
|
35787
|
-
|
|
35788
|
-
|
|
35789
|
-
|
|
35790
|
-
|
|
35791
|
-
|
|
36886
|
+
class ListItem {
|
|
36887
|
+
constructor(devtools, key, _data, getChildren, cache) {
|
|
36888
|
+
this.devtools = devtools;
|
|
36889
|
+
this.key = key;
|
|
36890
|
+
this._data = _data;
|
|
36891
|
+
this.getChildren = getChildren;
|
|
36892
|
+
this.cache = cache ?? devtools.anyCache;
|
|
36893
|
+
this.expandKey = `${key}/expand-key`;
|
|
36894
|
+
computed(this, "isExpanded");
|
|
36895
|
+
computed(this, "isFitted");
|
|
36896
|
+
computed(this, "totalChildCount");
|
|
36897
|
+
computed(this, "depthLine");
|
|
36898
|
+
computed(this, "depth");
|
|
36899
|
+
computed.struct(this, "children");
|
|
36900
|
+
computed.struct(this, "expandedChildren");
|
|
36901
|
+
computed.struct(this, "expandedChildrenWithSelf");
|
|
36902
|
+
computed(this, "data");
|
|
36903
|
+
computed(this, "isExpandable");
|
|
36904
|
+
action(this, "expand");
|
|
36905
|
+
action(this, "collapse");
|
|
36906
|
+
makeObservable(this);
|
|
36907
|
+
}
|
|
36908
|
+
cache;
|
|
36909
|
+
get isExpanded() {
|
|
36910
|
+
return this.cache.get(this.expandKey) === true;
|
|
36911
|
+
}
|
|
36912
|
+
get children() {
|
|
36913
|
+
return this.getChildren?.(this) ?? [];
|
|
36914
|
+
}
|
|
36915
|
+
get isExpandable() {
|
|
36916
|
+
return this.children.length > 0;
|
|
36917
|
+
}
|
|
36918
|
+
expand() {
|
|
36919
|
+
if (this.isExpandable) {
|
|
36920
|
+
this.cache.set(this.expandKey, true);
|
|
35792
36921
|
}
|
|
35793
|
-
|
|
35794
|
-
|
|
35795
|
-
|
|
35796
|
-
|
|
35797
|
-
|
|
35798
|
-
|
|
35799
|
-
|
|
35800
|
-
|
|
35801
|
-
|
|
35802
|
-
|
|
35803
|
-
|
|
35804
|
-
|
|
35805
|
-
|
|
35806
|
-
|
|
35807
|
-
|
|
35808
|
-
|
|
35809
|
-
|
|
35810
|
-
|
|
35811
|
-
|
|
35812
|
-
|
|
35813
|
-
|
|
35814
|
-
|
|
35815
|
-
|
|
35816
|
-
|
|
35817
|
-
|
|
35818
|
-
|
|
35819
|
-
|
|
35820
|
-
|
|
35821
|
-
|
|
35822
|
-
|
|
35823
|
-
|
|
35824
|
-
|
|
35825
|
-
|
|
35826
|
-
|
|
35827
|
-
|
|
35828
|
-
|
|
35829
|
-
|
|
35830
|
-
|
|
35831
|
-
|
|
35832
|
-
|
|
35833
|
-
|
|
35834
|
-
|
|
35835
|
-
|
|
35836
|
-
|
|
35837
|
-
|
|
35838
|
-
|
|
35839
|
-
|
|
35840
|
-
)
|
|
35841
|
-
|
|
36922
|
+
}
|
|
36923
|
+
collapse() {
|
|
36924
|
+
this.cache.set(this.expandKey, false);
|
|
36925
|
+
}
|
|
36926
|
+
toggleExpand() {
|
|
36927
|
+
if (this.isExpanded) {
|
|
36928
|
+
this.collapse();
|
|
36929
|
+
} else {
|
|
36930
|
+
this.expand();
|
|
36931
|
+
}
|
|
36932
|
+
}
|
|
36933
|
+
get expandedChildren() {
|
|
36934
|
+
if (!this.isExpanded) {
|
|
36935
|
+
return [];
|
|
36936
|
+
}
|
|
36937
|
+
const result = [];
|
|
36938
|
+
let stackIndex = 0;
|
|
36939
|
+
const stack = this.children;
|
|
36940
|
+
while (true) {
|
|
36941
|
+
const child = stack[stackIndex++];
|
|
36942
|
+
if (!child) {
|
|
36943
|
+
break;
|
|
36944
|
+
}
|
|
36945
|
+
result.push(child, ...child.expandedChildren);
|
|
36946
|
+
}
|
|
36947
|
+
return result;
|
|
36948
|
+
}
|
|
36949
|
+
get expandedChildrenWithSelf() {
|
|
36950
|
+
return [this, ...this.expandedChildren];
|
|
36951
|
+
}
|
|
36952
|
+
get data() {
|
|
36953
|
+
return this._data;
|
|
36954
|
+
}
|
|
36955
|
+
get isFitted() {
|
|
36956
|
+
return true;
|
|
36957
|
+
}
|
|
36958
|
+
get depthLine() {
|
|
36959
|
+
return String().padEnd(this.depth, "-");
|
|
36960
|
+
}
|
|
36961
|
+
expandKey;
|
|
36962
|
+
}
|
|
36963
|
+
class MetaListItem extends ListItem {
|
|
36964
|
+
constructor(devtools, key, content, _depth) {
|
|
36965
|
+
super(devtools, key, void 0);
|
|
36966
|
+
this.content = content;
|
|
36967
|
+
this._depth = _depth;
|
|
36968
|
+
}
|
|
36969
|
+
get depth() {
|
|
36970
|
+
return this._depth;
|
|
36971
|
+
}
|
|
36972
|
+
}
|
|
35842
36973
|
const ignoredKeys = /* @__PURE__ */ new Set(["constructor"]);
|
|
35843
36974
|
const ignoredPrototypes = /* @__PURE__ */ new Set([
|
|
35844
36975
|
globalThis.Object.prototype,
|
|
@@ -35892,52 +37023,340 @@ function getAllKeys(instance2) {
|
|
|
35892
37023
|
}
|
|
35893
37024
|
return Array.from(keysSet);
|
|
35894
37025
|
}
|
|
35895
|
-
|
|
35896
|
-
|
|
35897
|
-
|
|
35898
|
-
|
|
35899
|
-
|
|
35900
|
-
|
|
37026
|
+
class VMListItem extends ListItem {
|
|
37027
|
+
constructor(devtools, vm, allVms, parent) {
|
|
37028
|
+
const displayName = vm.constructor.name;
|
|
37029
|
+
const key = `${displayName}-${vm.id}`;
|
|
37030
|
+
super(devtools, key, vm, void 0, /* @__PURE__ */ new Map());
|
|
37031
|
+
this.allVms = allVms;
|
|
37032
|
+
this.parent = parent;
|
|
37033
|
+
this.displayName = displayName;
|
|
37034
|
+
this.searchData = {
|
|
37035
|
+
name: displayName.toLowerCase().trim(),
|
|
37036
|
+
id: (vm.id || "").toLowerCase().trim()
|
|
37037
|
+
};
|
|
37038
|
+
computed.struct(this, "childVMListItems");
|
|
37039
|
+
computed.struct(this, "propertyListItems");
|
|
37040
|
+
makeObservable(this);
|
|
37041
|
+
untracked(() => {
|
|
37042
|
+
this.expand();
|
|
37043
|
+
});
|
|
37044
|
+
}
|
|
37045
|
+
get childVMListItems() {
|
|
37046
|
+
return this.allVms.filter((maybeChildVm) => {
|
|
37047
|
+
const params = this.getVmParams(maybeChildVm);
|
|
37048
|
+
return params?.parentViewModel && params.parentViewModel === this.data;
|
|
37049
|
+
}).map((it) => new VMListItem(this.devtools, it, this.allVms, this));
|
|
37050
|
+
}
|
|
37051
|
+
get isFitted() {
|
|
37052
|
+
const { searchEngine } = this.devtools;
|
|
37053
|
+
if (!searchEngine.isActive) {
|
|
37054
|
+
return true;
|
|
37055
|
+
}
|
|
37056
|
+
const firstSegment = searchEngine.segments[0];
|
|
37057
|
+
const secondSegment = searchEngine.segments[1];
|
|
37058
|
+
let isFittedById;
|
|
37059
|
+
let isFittedByName;
|
|
37060
|
+
if (secondSegment) {
|
|
37061
|
+
isFittedById = this.searchData.id === firstSegment;
|
|
37062
|
+
isFittedByName = this.searchData.name === firstSegment;
|
|
37063
|
+
} else {
|
|
37064
|
+
isFittedById = this.searchData.id.startsWith(firstSegment);
|
|
37065
|
+
isFittedByName = this.searchData.name.startsWith(firstSegment);
|
|
37066
|
+
}
|
|
37067
|
+
return isFittedByName || isFittedById;
|
|
37068
|
+
}
|
|
37069
|
+
get propertyListItems() {
|
|
37070
|
+
return getAllKeys(this.data).map((property2, order) => {
|
|
37071
|
+
return PropertyListItem.create(
|
|
37072
|
+
this.devtools,
|
|
37073
|
+
property2,
|
|
37074
|
+
property2,
|
|
37075
|
+
order,
|
|
37076
|
+
this
|
|
37077
|
+
);
|
|
37078
|
+
});
|
|
37079
|
+
}
|
|
37080
|
+
get children() {
|
|
37081
|
+
return [...this.propertyListItems, ...this.childVMListItems];
|
|
37082
|
+
}
|
|
37083
|
+
getVmParams(vm) {
|
|
37084
|
+
if ("vmParams" in vm) {
|
|
37085
|
+
return vm.vmParams;
|
|
37086
|
+
}
|
|
37087
|
+
return null;
|
|
37088
|
+
}
|
|
37089
|
+
get depth() {
|
|
37090
|
+
if (this.parent && this.devtools.presentationMode === "tree") {
|
|
37091
|
+
return this.parent.depth + 1;
|
|
37092
|
+
}
|
|
37093
|
+
return 0;
|
|
37094
|
+
}
|
|
37095
|
+
searchData;
|
|
37096
|
+
displayName;
|
|
37097
|
+
}
|
|
37098
|
+
class PropertyListItem extends ListItem {
|
|
37099
|
+
constructor(devtools, property2, path, order, parent) {
|
|
37100
|
+
super(devtools, PropertyListItem.createKey(parent, property2), void 0);
|
|
37101
|
+
this.property = property2;
|
|
37102
|
+
this.path = path;
|
|
37103
|
+
this.order = order;
|
|
37104
|
+
this.parent = parent;
|
|
37105
|
+
computed(this, "type");
|
|
37106
|
+
computed(this, "searchData");
|
|
37107
|
+
computed(this, "propertyClosingTag");
|
|
37108
|
+
computed(this, "dataType");
|
|
37109
|
+
computed(this, "stringifiedDataType");
|
|
37110
|
+
computed(this, "extraContent");
|
|
37111
|
+
makeObservable(this);
|
|
37112
|
+
}
|
|
37113
|
+
get data() {
|
|
37114
|
+
return this.property && this.parent.data[this.property];
|
|
37115
|
+
}
|
|
37116
|
+
get dataType() {
|
|
37117
|
+
return typeof this.data;
|
|
37118
|
+
}
|
|
37119
|
+
get stringifiedDataType() {
|
|
37120
|
+
return Object.prototype.toString.call(this.data);
|
|
37121
|
+
}
|
|
37122
|
+
get type() {
|
|
37123
|
+
if (Array.isArray(this.data)) {
|
|
37124
|
+
return "array";
|
|
37125
|
+
}
|
|
37126
|
+
if (_exports.isObject(this.data) && this.data.constructor?.name && this.data.constructor.name !== "Object") {
|
|
37127
|
+
return "instance";
|
|
37128
|
+
} else if (_exports.isFunction(this.data)) {
|
|
37129
|
+
return "function";
|
|
37130
|
+
} else if (_exports.isObject(this.data)) {
|
|
37131
|
+
return "object";
|
|
37132
|
+
} else if (this.stringifiedDataType.startsWith("[object ") && this.data && typeof this.data === "object" && "constructor" in this.data) {
|
|
37133
|
+
return "instance";
|
|
37134
|
+
} else {
|
|
37135
|
+
return "primitive";
|
|
37136
|
+
}
|
|
37137
|
+
}
|
|
37138
|
+
get children() {
|
|
37139
|
+
if (this.type === "array") {
|
|
37140
|
+
const arrayChildItems = Object.keys(this.data).map(
|
|
37141
|
+
(property2, order) => PropertyListItem.create(
|
|
37142
|
+
this.devtools,
|
|
37143
|
+
property2,
|
|
37144
|
+
`${this.path}.${property2}`,
|
|
37145
|
+
order,
|
|
37146
|
+
this
|
|
37147
|
+
)
|
|
37148
|
+
);
|
|
37149
|
+
arrayChildItems.push(
|
|
37150
|
+
PropertyListItem.create(
|
|
37151
|
+
this.devtools,
|
|
37152
|
+
"length",
|
|
37153
|
+
`${this.path}.length`,
|
|
37154
|
+
arrayChildItems.length,
|
|
37155
|
+
this
|
|
37156
|
+
)
|
|
37157
|
+
);
|
|
37158
|
+
return arrayChildItems;
|
|
37159
|
+
}
|
|
37160
|
+
if (this.type === "function") {
|
|
37161
|
+
return Object.keys(this.data).map((property2, order) => {
|
|
37162
|
+
return PropertyListItem.create(
|
|
37163
|
+
this.devtools,
|
|
37164
|
+
property2,
|
|
37165
|
+
`${this.path}.${property2}`,
|
|
37166
|
+
order,
|
|
37167
|
+
this
|
|
37168
|
+
);
|
|
37169
|
+
});
|
|
37170
|
+
}
|
|
37171
|
+
if (this.type === "instance" || this.type === "object") {
|
|
37172
|
+
return getAllKeys(this.data).map((property2, order) => {
|
|
37173
|
+
return PropertyListItem.create(
|
|
37174
|
+
this.devtools,
|
|
37175
|
+
property2,
|
|
37176
|
+
`${this.path}.${property2}`,
|
|
37177
|
+
order,
|
|
37178
|
+
this
|
|
37179
|
+
);
|
|
37180
|
+
});
|
|
37181
|
+
}
|
|
37182
|
+
return [];
|
|
37183
|
+
}
|
|
37184
|
+
get isFitted() {
|
|
37185
|
+
const { searchEngine } = this.devtools;
|
|
37186
|
+
if (!searchEngine.isActive || !this.property) {
|
|
37187
|
+
return true;
|
|
37188
|
+
}
|
|
37189
|
+
return searchEngine.segments.some((it) => it.startsWith(this.property));
|
|
37190
|
+
}
|
|
37191
|
+
get extraContent() {
|
|
37192
|
+
if (this.isExpanded) {
|
|
37193
|
+
return null;
|
|
37194
|
+
}
|
|
37195
|
+
if (this.parent.isExpanded) {
|
|
37196
|
+
if (this.parent instanceof VMListItem) {
|
|
37197
|
+
return ",";
|
|
37198
|
+
}
|
|
37199
|
+
if (this.parent instanceof PropertyListItem)
|
|
37200
|
+
switch (this.parent.type) {
|
|
37201
|
+
case "array":
|
|
37202
|
+
case "instance":
|
|
37203
|
+
case "object":
|
|
37204
|
+
return ",";
|
|
37205
|
+
}
|
|
37206
|
+
}
|
|
37207
|
+
return null;
|
|
37208
|
+
}
|
|
37209
|
+
get propertyClosingTag() {
|
|
37210
|
+
switch (this.type) {
|
|
37211
|
+
case "array":
|
|
37212
|
+
return new MetaListItem(
|
|
37213
|
+
this.devtools,
|
|
37214
|
+
`${this.key}/closing-tag`,
|
|
37215
|
+
"]",
|
|
37216
|
+
this.depth
|
|
37217
|
+
);
|
|
37218
|
+
case "instance":
|
|
37219
|
+
case "object":
|
|
37220
|
+
return new MetaListItem(
|
|
37221
|
+
this.devtools,
|
|
37222
|
+
`${this.key}/closing-tag`,
|
|
37223
|
+
"}",
|
|
37224
|
+
this.depth
|
|
37225
|
+
);
|
|
37226
|
+
default:
|
|
37227
|
+
return null;
|
|
37228
|
+
}
|
|
37229
|
+
}
|
|
37230
|
+
get expandedChildren() {
|
|
37231
|
+
if (!this.isExpanded || !this.isExpandable) {
|
|
37232
|
+
return [];
|
|
37233
|
+
}
|
|
37234
|
+
const result = [];
|
|
37235
|
+
let stackIndex = 0;
|
|
37236
|
+
const stack = this.children;
|
|
37237
|
+
while (true) {
|
|
37238
|
+
const child = stack[stackIndex++];
|
|
37239
|
+
if (!child) {
|
|
37240
|
+
break;
|
|
37241
|
+
}
|
|
37242
|
+
result.push(child, ...child.expandedChildren);
|
|
37243
|
+
}
|
|
37244
|
+
if (this.propertyClosingTag) {
|
|
37245
|
+
result.push(this.propertyClosingTag);
|
|
37246
|
+
}
|
|
37247
|
+
return result;
|
|
37248
|
+
}
|
|
37249
|
+
get depth() {
|
|
37250
|
+
return this.parent.depth + 1;
|
|
37251
|
+
}
|
|
37252
|
+
get searchData() {
|
|
37253
|
+
return {
|
|
37254
|
+
property: this.property?.toLowerCase() || ""
|
|
37255
|
+
};
|
|
37256
|
+
}
|
|
37257
|
+
static createKey(parent, property2) {
|
|
37258
|
+
return `${parent.key}-${property2}`;
|
|
37259
|
+
}
|
|
37260
|
+
static create(devtools, property2, path, order, parent) {
|
|
37261
|
+
const cache = parent.cache ?? devtools.anyCache;
|
|
37262
|
+
const key = `${PropertyListItem.createKey(parent, property2)}/list-item`;
|
|
37263
|
+
let item = cache.get(key);
|
|
37264
|
+
if (!item) {
|
|
37265
|
+
item = new PropertyListItem(devtools, property2, path, order, parent);
|
|
37266
|
+
cache.set(key, item);
|
|
37267
|
+
}
|
|
37268
|
+
return item;
|
|
37269
|
+
}
|
|
37270
|
+
}
|
|
37271
|
+
const iconToggleButton = "iconToggleButton_R48wm";
|
|
37272
|
+
const activePosition = "activePosition_IXsRn";
|
|
37273
|
+
const option = "option_a5IcR";
|
|
37274
|
+
const active = "active_6QS-2";
|
|
37275
|
+
const css$3 = {
|
|
37276
|
+
iconToggleButton,
|
|
37277
|
+
activePosition,
|
|
37278
|
+
option,
|
|
37279
|
+
active
|
|
37280
|
+
};
|
|
37281
|
+
const IconToggleButton = ({
|
|
37282
|
+
value,
|
|
37283
|
+
options,
|
|
37284
|
+
className,
|
|
37285
|
+
onUpdate
|
|
35901
37286
|
}) => {
|
|
37287
|
+
const optionNodes = [];
|
|
37288
|
+
let activeIndex;
|
|
37289
|
+
options.forEach((option2, i) => {
|
|
37290
|
+
const { icon: Icon, value: optionValue } = option2;
|
|
37291
|
+
const isActive = value === optionValue;
|
|
37292
|
+
if (isActive) {
|
|
37293
|
+
activeIndex = i;
|
|
37294
|
+
}
|
|
37295
|
+
optionNodes.push(
|
|
37296
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("div", { className: cx(css$3.option, {
|
|
37297
|
+
[css$3.active]: isActive
|
|
37298
|
+
}), children: /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(Icon, {}, void 0, false, {
|
|
37299
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/shared/icon-toggle-button/index.tsx",
|
|
37300
|
+
lineNumber: 32,
|
|
37301
|
+
columnNumber: 9
|
|
37302
|
+
}, void 0) }, i, false, {
|
|
37303
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/shared/icon-toggle-button/index.tsx",
|
|
37304
|
+
lineNumber: 29,
|
|
37305
|
+
columnNumber: 7
|
|
37306
|
+
}, void 0)
|
|
37307
|
+
);
|
|
37308
|
+
});
|
|
35902
37309
|
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
35903
|
-
"
|
|
37310
|
+
"button",
|
|
35904
37311
|
{
|
|
35905
|
-
|
|
35906
|
-
|
|
35907
|
-
[
|
|
35908
|
-
|
|
35909
|
-
|
|
35910
|
-
|
|
35911
|
-
|
|
35912
|
-
|
|
35913
|
-
|
|
35914
|
-
|
|
35915
|
-
|
|
37312
|
+
className: cx(css$3.iconToggleButton, className),
|
|
37313
|
+
onClick: () => {
|
|
37314
|
+
const nextOption = activeIndex !== void 0 && options[activeIndex + 1] || options[0];
|
|
37315
|
+
onUpdate(nextOption.value);
|
|
37316
|
+
},
|
|
37317
|
+
children: [
|
|
37318
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
37319
|
+
"div",
|
|
37320
|
+
{
|
|
37321
|
+
className: css$3.activePosition,
|
|
37322
|
+
style: { "--index": activeIndex }
|
|
37323
|
+
},
|
|
37324
|
+
void 0,
|
|
37325
|
+
false,
|
|
37326
|
+
{
|
|
37327
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/shared/icon-toggle-button/index.tsx",
|
|
37328
|
+
lineNumber: 46,
|
|
37329
|
+
columnNumber: 7
|
|
37330
|
+
},
|
|
37331
|
+
void 0
|
|
37332
|
+
),
|
|
37333
|
+
optionNodes
|
|
37334
|
+
]
|
|
35916
37335
|
},
|
|
35917
37336
|
void 0,
|
|
35918
|
-
|
|
37337
|
+
true,
|
|
35919
37338
|
{
|
|
35920
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/
|
|
35921
|
-
lineNumber:
|
|
37339
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/shared/icon-toggle-button/index.tsx",
|
|
37340
|
+
lineNumber: 38,
|
|
35922
37341
|
columnNumber: 5
|
|
35923
37342
|
},
|
|
35924
37343
|
void 0
|
|
35925
37344
|
);
|
|
35926
37345
|
};
|
|
35927
|
-
const property = "
|
|
35928
|
-
const expandable = "
|
|
35929
|
-
const instance = "
|
|
35930
|
-
const primitive = "
|
|
35931
|
-
const boolean = "
|
|
35932
|
-
const number = "
|
|
35933
|
-
const object2 = "
|
|
35934
|
-
const bigint = "
|
|
35935
|
-
const symbol = "
|
|
35936
|
-
const string = "
|
|
35937
|
-
const propertyName = "
|
|
35938
|
-
const propertyMeta = "
|
|
35939
|
-
const propertyValue = "
|
|
35940
|
-
const css$
|
|
37346
|
+
const property = "property_Oy4bS";
|
|
37347
|
+
const expandable = "expandable_usEY-";
|
|
37348
|
+
const instance = "instance_g6xOw";
|
|
37349
|
+
const primitive = "primitive_v003s";
|
|
37350
|
+
const boolean = "boolean_INujc";
|
|
37351
|
+
const number = "number_7K-jw";
|
|
37352
|
+
const object2 = "object_3K21J";
|
|
37353
|
+
const bigint = "bigint_NCBnp";
|
|
37354
|
+
const symbol = "symbol_Nk-vG";
|
|
37355
|
+
const string = "string_DCKmP";
|
|
37356
|
+
const propertyName = "propertyName_Jbwvb";
|
|
37357
|
+
const propertyMeta = "propertyMeta_D04Er";
|
|
37358
|
+
const propertyValue = "propertyValue_bht-2";
|
|
37359
|
+
const css$2 = {
|
|
35941
37360
|
property,
|
|
35942
37361
|
expandable,
|
|
35943
37362
|
instance,
|
|
@@ -35945,802 +37364,756 @@ const css$1 = {
|
|
|
35945
37364
|
boolean,
|
|
35946
37365
|
number,
|
|
35947
37366
|
object: object2,
|
|
35948
|
-
"undefined": "undefined_xHzJR",
|
|
35949
37367
|
bigint,
|
|
35950
37368
|
symbol,
|
|
37369
|
+
"undefined": "undefined_32Xx8",
|
|
37370
|
+
"null": "null_jbJLZ",
|
|
35951
37371
|
string,
|
|
35952
37372
|
propertyName,
|
|
35953
37373
|
propertyMeta,
|
|
35954
37374
|
propertyValue
|
|
35955
37375
|
};
|
|
35956
|
-
const
|
|
35957
|
-
|
|
35958
|
-
|
|
35959
|
-
const keys = Object.keys(value);
|
|
35960
|
-
const isExpandable = keys.length > 0;
|
|
35961
|
-
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(jsxDevRuntimeExports.Fragment, { children: [
|
|
35962
|
-
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
37376
|
+
const MetaListItemRender = observer(
|
|
37377
|
+
({ item }) => {
|
|
37378
|
+
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
35963
37379
|
"div",
|
|
35964
37380
|
{
|
|
35965
|
-
className: cx(css$
|
|
35966
|
-
|
|
35967
|
-
|
|
37381
|
+
className: cx(css$2.property, css$2.primitive),
|
|
37382
|
+
style: { "--level": item.depth },
|
|
37383
|
+
"data-fitted": item.isFitted,
|
|
37384
|
+
title: String(item.data),
|
|
37385
|
+
"data-depth": item.depthLine,
|
|
37386
|
+
children: item.content
|
|
37387
|
+
},
|
|
37388
|
+
void 0,
|
|
37389
|
+
false,
|
|
37390
|
+
{
|
|
37391
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/meta-list-item-render.tsx",
|
|
37392
|
+
lineNumber: 10,
|
|
37393
|
+
columnNumber: 7
|
|
37394
|
+
},
|
|
37395
|
+
void 0
|
|
37396
|
+
);
|
|
37397
|
+
}
|
|
37398
|
+
);
|
|
37399
|
+
const ArrayProperty = observer(
|
|
37400
|
+
({ item }) => {
|
|
37401
|
+
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
37402
|
+
"div",
|
|
37403
|
+
{
|
|
37404
|
+
className: cx(css$2.property, css$2.array, {
|
|
37405
|
+
[css$2.expandable]: item.isExpandable,
|
|
37406
|
+
[css$2.expanded]: item.isExpanded
|
|
35968
37407
|
}),
|
|
35969
|
-
style: { "--level":
|
|
35970
|
-
onClick: () =>
|
|
35971
|
-
"data-fitted":
|
|
35972
|
-
"data-depth":
|
|
37408
|
+
style: { "--level": item.depth, "--order": item.order },
|
|
37409
|
+
onClick: (e) => item.devtools.handlePropertyClick(item, e),
|
|
37410
|
+
"data-fitted": item.isFitted,
|
|
37411
|
+
"data-depth": item.depthLine,
|
|
35973
37412
|
children: [
|
|
35974
|
-
|
|
35975
|
-
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("span", { className: css$
|
|
35976
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/
|
|
35977
|
-
lineNumber:
|
|
37413
|
+
item.property === void 0 ? null : /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(jsxDevRuntimeExports.Fragment, { children: [
|
|
37414
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("span", { className: css$2.propertyName, children: item.property }, void 0, false, {
|
|
37415
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/propert-list-item-render/array.tsx",
|
|
37416
|
+
lineNumber: 24,
|
|
35978
37417
|
columnNumber: 13
|
|
35979
37418
|
}, void 0),
|
|
35980
37419
|
": "
|
|
35981
37420
|
] }, void 0, true, {
|
|
35982
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/
|
|
35983
|
-
lineNumber:
|
|
37421
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/propert-list-item-render/array.tsx",
|
|
37422
|
+
lineNumber: 23,
|
|
35984
37423
|
columnNumber: 11
|
|
35985
37424
|
}, void 0),
|
|
35986
|
-
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("span", { className: css$
|
|
35987
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/
|
|
35988
|
-
lineNumber:
|
|
37425
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("span", { className: css$2.propertyValue, children: item.isExpanded ? "[" : item.isExpandable ? "[...]" : `[]` }, void 0, false, {
|
|
37426
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/propert-list-item-render/array.tsx",
|
|
37427
|
+
lineNumber: 28,
|
|
35989
37428
|
columnNumber: 9
|
|
35990
37429
|
}, void 0),
|
|
35991
|
-
|
|
37430
|
+
item.extraContent
|
|
35992
37431
|
]
|
|
35993
37432
|
},
|
|
35994
37433
|
void 0,
|
|
35995
37434
|
true,
|
|
35996
37435
|
{
|
|
35997
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/
|
|
35998
|
-
lineNumber:
|
|
37436
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/propert-list-item-render/array.tsx",
|
|
37437
|
+
lineNumber: 10,
|
|
35999
37438
|
columnNumber: 7
|
|
36000
37439
|
},
|
|
36001
37440
|
void 0
|
|
36002
|
-
)
|
|
36003
|
-
|
|
36004
|
-
|
|
36005
|
-
|
|
36006
|
-
|
|
36007
|
-
|
|
36008
|
-
|
|
36009
|
-
|
|
36010
|
-
|
|
36011
|
-
|
|
36012
|
-
path: `${props.path}.${key}`,
|
|
36013
|
-
level: props.level + 1,
|
|
36014
|
-
extraRight: ","
|
|
36015
|
-
}
|
|
36016
|
-
)),
|
|
36017
|
-
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
36018
|
-
"div",
|
|
36019
|
-
{
|
|
36020
|
-
className: css$1.property,
|
|
36021
|
-
style: {
|
|
36022
|
-
"--level": props.level,
|
|
36023
|
-
"--order": keys.length
|
|
36024
|
-
},
|
|
36025
|
-
children: [
|
|
36026
|
-
`]`,
|
|
36027
|
-
extraRight
|
|
36028
|
-
]
|
|
36029
|
-
},
|
|
36030
|
-
void 0,
|
|
36031
|
-
true,
|
|
36032
|
-
{
|
|
36033
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/property/array.tsx",
|
|
36034
|
-
lineNumber: 53,
|
|
36035
|
-
columnNumber: 11
|
|
36036
|
-
},
|
|
36037
|
-
void 0
|
|
36038
|
-
)
|
|
36039
|
-
] }, void 0, true, {
|
|
36040
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/property/array.tsx",
|
|
36041
|
-
lineNumber: 40,
|
|
36042
|
-
columnNumber: 9
|
|
36043
|
-
}, void 0)
|
|
36044
|
-
] }, void 0, true, {
|
|
36045
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/property/array.tsx",
|
|
36046
|
-
lineNumber: 15,
|
|
36047
|
-
columnNumber: 5
|
|
36048
|
-
}, void 0);
|
|
36049
|
-
});
|
|
36050
|
-
const FunctionProperty = observer((props) => {
|
|
36051
|
-
const { name: property2, value, extraRight } = props;
|
|
36052
|
-
const argLabels = Array.from(
|
|
36053
|
-
{ length: value.length },
|
|
36054
|
-
(_15, i) => `arg${i + 1}`
|
|
36055
|
-
);
|
|
36056
|
-
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
36057
|
-
"div",
|
|
36058
|
-
{
|
|
36059
|
-
className: cx(css$1.property, css$1.function),
|
|
36060
|
-
title: String(value),
|
|
36061
|
-
style: { "--level": props.level, "--order": props.order },
|
|
36062
|
-
"data-fitted": props.isFitted,
|
|
36063
|
-
"data-depth": String().padEnd(props.level, "-"),
|
|
36064
|
-
children: [
|
|
36065
|
-
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("span", { className: css$1.propertyName, children: property2 }, void 0, false, {
|
|
36066
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/property/function.tsx",
|
|
36067
|
-
lineNumber: 25,
|
|
36068
|
-
columnNumber: 7
|
|
36069
|
-
}, void 0),
|
|
36070
|
-
`(${argLabels.join(", ")})`,
|
|
36071
|
-
extraRight
|
|
36072
|
-
]
|
|
36073
|
-
},
|
|
36074
|
-
void 0,
|
|
36075
|
-
true,
|
|
36076
|
-
{
|
|
36077
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/property/function.tsx",
|
|
36078
|
-
lineNumber: 16,
|
|
36079
|
-
columnNumber: 5
|
|
36080
|
-
},
|
|
36081
|
-
void 0
|
|
36082
|
-
);
|
|
36083
|
-
});
|
|
36084
|
-
const InstanceProperty = observer((props) => {
|
|
36085
|
-
const { name, value, model, extraRight } = props;
|
|
36086
|
-
const isExpanded = model.isPathExpanded(props.path);
|
|
36087
|
-
const Constructor = value.constructor;
|
|
36088
|
-
const className = Constructor.name;
|
|
36089
|
-
const keys = getAllKeys(value);
|
|
36090
|
-
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(jsxDevRuntimeExports.Fragment, { children: [
|
|
36091
|
-
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
37441
|
+
);
|
|
37442
|
+
}
|
|
37443
|
+
);
|
|
37444
|
+
const FunctionProperty = observer(
|
|
37445
|
+
({ item }) => {
|
|
37446
|
+
const argLabels = Array.from(
|
|
37447
|
+
{ length: item.data.length },
|
|
37448
|
+
(_15, i) => `arg${i + 1}`
|
|
37449
|
+
);
|
|
37450
|
+
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
36092
37451
|
"div",
|
|
36093
37452
|
{
|
|
36094
|
-
className: cx(css$
|
|
36095
|
-
|
|
37453
|
+
className: cx(css$2.property, css$2.function),
|
|
37454
|
+
title: String(item.data),
|
|
37455
|
+
style: { "--level": item.depth, "--order": item.order },
|
|
37456
|
+
"data-fitted": item.isFitted,
|
|
37457
|
+
onClick: (e) => item.devtools.handlePropertyClick(item, e),
|
|
37458
|
+
"data-depth": item.depthLine,
|
|
37459
|
+
children: [
|
|
37460
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("span", { className: css$2.propertyName, children: item.property }, void 0, false, {
|
|
37461
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/propert-list-item-render/function.tsx",
|
|
37462
|
+
lineNumber: 25,
|
|
37463
|
+
columnNumber: 9
|
|
37464
|
+
}, void 0),
|
|
37465
|
+
`(${argLabels.join(", ")})`,
|
|
37466
|
+
item.extraContent
|
|
37467
|
+
]
|
|
37468
|
+
},
|
|
37469
|
+
void 0,
|
|
37470
|
+
true,
|
|
37471
|
+
{
|
|
37472
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/propert-list-item-render/function.tsx",
|
|
37473
|
+
lineNumber: 15,
|
|
37474
|
+
columnNumber: 7
|
|
37475
|
+
},
|
|
37476
|
+
void 0
|
|
37477
|
+
);
|
|
37478
|
+
}
|
|
37479
|
+
);
|
|
37480
|
+
const InstanceProperty = observer(
|
|
37481
|
+
({ item }) => {
|
|
37482
|
+
const Constructor = item.data.constructor;
|
|
37483
|
+
const className = Constructor.name;
|
|
37484
|
+
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
37485
|
+
"div",
|
|
37486
|
+
{
|
|
37487
|
+
className: cx(css$2.property, css$2.instance, css$2.expandable, {
|
|
37488
|
+
[css$2.expanded]: item.isExpanded
|
|
36096
37489
|
}),
|
|
36097
|
-
style: { "--level":
|
|
36098
|
-
onClick: () =>
|
|
36099
|
-
"data-fitted":
|
|
36100
|
-
"data-depth":
|
|
37490
|
+
style: { "--level": item.depth, "--order": item.order },
|
|
37491
|
+
onClick: (e) => item.devtools.handlePropertyClick(item, e),
|
|
37492
|
+
"data-fitted": item.isFitted,
|
|
37493
|
+
"data-depth": item.depthLine,
|
|
36101
37494
|
children: [
|
|
36102
|
-
|
|
36103
|
-
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("span", { className: css$
|
|
36104
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/
|
|
36105
|
-
lineNumber:
|
|
37495
|
+
item.property === void 0 ? null : /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(jsxDevRuntimeExports.Fragment, { children: [
|
|
37496
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("span", { className: css$2.propertyName, children: item.property }, void 0, false, {
|
|
37497
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/propert-list-item-render/instance.tsx",
|
|
37498
|
+
lineNumber: 26,
|
|
36106
37499
|
columnNumber: 13
|
|
36107
37500
|
}, void 0),
|
|
36108
37501
|
": "
|
|
36109
37502
|
] }, void 0, true, {
|
|
36110
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/
|
|
36111
|
-
lineNumber:
|
|
37503
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/propert-list-item-render/instance.tsx",
|
|
37504
|
+
lineNumber: 25,
|
|
36112
37505
|
columnNumber: 11
|
|
36113
37506
|
}, void 0),
|
|
36114
|
-
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("span", { className: css$
|
|
36115
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/
|
|
36116
|
-
lineNumber:
|
|
37507
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("span", { className: css$2.propertyValue, children: `${className}` }, void 0, false, {
|
|
37508
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/propert-list-item-render/instance.tsx",
|
|
37509
|
+
lineNumber: 30,
|
|
36117
37510
|
columnNumber: 9
|
|
36118
37511
|
}, void 0),
|
|
36119
|
-
isExpanded && /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(jsxDevRuntimeExports.Fragment, { children: [
|
|
37512
|
+
item.isExpanded && /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(jsxDevRuntimeExports.Fragment, { children: [
|
|
36120
37513
|
" ",
|
|
36121
37514
|
`{`
|
|
36122
37515
|
] }, void 0, true, {
|
|
36123
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/
|
|
36124
|
-
lineNumber:
|
|
36125
|
-
columnNumber:
|
|
37516
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/propert-list-item-render/instance.tsx",
|
|
37517
|
+
lineNumber: 31,
|
|
37518
|
+
columnNumber: 29
|
|
36126
37519
|
}, void 0),
|
|
36127
|
-
|
|
37520
|
+
item.extraContent
|
|
36128
37521
|
]
|
|
36129
37522
|
},
|
|
36130
37523
|
void 0,
|
|
36131
37524
|
true,
|
|
36132
37525
|
{
|
|
36133
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/
|
|
36134
|
-
lineNumber:
|
|
37526
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/propert-list-item-render/instance.tsx",
|
|
37527
|
+
lineNumber: 13,
|
|
36135
37528
|
columnNumber: 7
|
|
36136
37529
|
},
|
|
36137
37530
|
void 0
|
|
36138
|
-
)
|
|
36139
|
-
|
|
36140
|
-
|
|
36141
|
-
|
|
36142
|
-
|
|
36143
|
-
|
|
36144
|
-
name: key,
|
|
36145
|
-
order,
|
|
36146
|
-
value: value[key],
|
|
36147
|
-
key,
|
|
36148
|
-
path: `${props.path}.${key}`,
|
|
36149
|
-
level: props.level + 1,
|
|
36150
|
-
extraRight: `,`
|
|
36151
|
-
}
|
|
36152
|
-
)),
|
|
36153
|
-
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
36154
|
-
"div",
|
|
36155
|
-
{
|
|
36156
|
-
className: cx(css$1.property, css$1.instance),
|
|
36157
|
-
style: {
|
|
36158
|
-
"--level": props.level,
|
|
36159
|
-
"--order": keys.length
|
|
36160
|
-
},
|
|
36161
|
-
children: [
|
|
36162
|
-
`}`,
|
|
36163
|
-
extraRight
|
|
36164
|
-
]
|
|
36165
|
-
},
|
|
36166
|
-
void 0,
|
|
36167
|
-
true,
|
|
36168
|
-
{
|
|
36169
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/property/instance.tsx",
|
|
36170
|
-
lineNumber: 54,
|
|
36171
|
-
columnNumber: 11
|
|
36172
|
-
},
|
|
36173
|
-
void 0
|
|
36174
|
-
)
|
|
36175
|
-
] }, void 0, true, {
|
|
36176
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/property/instance.tsx",
|
|
36177
|
-
lineNumber: 41,
|
|
36178
|
-
columnNumber: 9
|
|
36179
|
-
}, void 0)
|
|
36180
|
-
] }, void 0, true, {
|
|
36181
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/property/instance.tsx",
|
|
36182
|
-
lineNumber: 18,
|
|
36183
|
-
columnNumber: 5
|
|
36184
|
-
}, void 0);
|
|
36185
|
-
});
|
|
36186
|
-
const ObjectProperty = observer((props) => {
|
|
36187
|
-
const { name, value, model, extraRight } = props;
|
|
36188
|
-
const isExpanded = model.isPathExpanded(props.path);
|
|
36189
|
-
const keys = getAllKeys(value);
|
|
36190
|
-
const isExpandable = keys.length > 0;
|
|
36191
|
-
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(jsxDevRuntimeExports.Fragment, { children: [
|
|
36192
|
-
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
37531
|
+
);
|
|
37532
|
+
}
|
|
37533
|
+
);
|
|
37534
|
+
const ObjectProperty = observer(
|
|
37535
|
+
({ item }) => {
|
|
37536
|
+
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
36193
37537
|
"div",
|
|
36194
37538
|
{
|
|
36195
|
-
className: cx(css$
|
|
36196
|
-
[css$
|
|
36197
|
-
[css$
|
|
37539
|
+
className: cx(css$2.property, css$2.object, {
|
|
37540
|
+
[css$2.expandable]: item.isExpandable,
|
|
37541
|
+
[css$2.expanded]: item.isExpanded
|
|
36198
37542
|
}),
|
|
36199
|
-
style: { "--level":
|
|
36200
|
-
onClick: () =>
|
|
36201
|
-
"data-fitted":
|
|
36202
|
-
"data-depth":
|
|
37543
|
+
style: { "--level": item.depth, "--order": item.order },
|
|
37544
|
+
onClick: (e) => item.devtools.handlePropertyClick(item, e),
|
|
37545
|
+
"data-fitted": item.isFitted,
|
|
37546
|
+
"data-depth": item.depthLine,
|
|
36203
37547
|
children: [
|
|
36204
|
-
|
|
36205
|
-
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("span", { className: css$
|
|
36206
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/
|
|
36207
|
-
lineNumber:
|
|
37548
|
+
item.property === void 0 ? null : /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(jsxDevRuntimeExports.Fragment, { children: [
|
|
37549
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("span", { className: css$2.propertyName, children: item.property }, void 0, false, {
|
|
37550
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/propert-list-item-render/object.tsx",
|
|
37551
|
+
lineNumber: 24,
|
|
36208
37552
|
columnNumber: 13
|
|
36209
37553
|
}, void 0),
|
|
36210
37554
|
": "
|
|
36211
37555
|
] }, void 0, true, {
|
|
36212
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/
|
|
36213
|
-
lineNumber:
|
|
37556
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/propert-list-item-render/object.tsx",
|
|
37557
|
+
lineNumber: 23,
|
|
36214
37558
|
columnNumber: 11
|
|
36215
37559
|
}, void 0),
|
|
36216
|
-
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("span", { className: css$
|
|
36217
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/
|
|
36218
|
-
lineNumber:
|
|
37560
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("span", { className: css$2.propertyValue, children: item.isExpanded ? "{" : item.isExpandable ? "{...}" : `{}` }, void 0, false, {
|
|
37561
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/propert-list-item-render/object.tsx",
|
|
37562
|
+
lineNumber: 28,
|
|
36219
37563
|
columnNumber: 9
|
|
36220
37564
|
}, void 0),
|
|
36221
|
-
|
|
37565
|
+
item.extraContent
|
|
36222
37566
|
]
|
|
36223
37567
|
},
|
|
36224
37568
|
void 0,
|
|
36225
37569
|
true,
|
|
36226
37570
|
{
|
|
36227
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/
|
|
36228
|
-
lineNumber:
|
|
37571
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/propert-list-item-render/object.tsx",
|
|
37572
|
+
lineNumber: 10,
|
|
36229
37573
|
columnNumber: 7
|
|
36230
37574
|
},
|
|
36231
37575
|
void 0
|
|
36232
|
-
)
|
|
36233
|
-
isExpanded && /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(jsxDevRuntimeExports.Fragment, { children: [
|
|
36234
|
-
keys.map((key, order, arr) => /* @__PURE__ */ reactExports.createElement(
|
|
36235
|
-
Property,
|
|
36236
|
-
{
|
|
36237
|
-
...props,
|
|
36238
|
-
name: key,
|
|
36239
|
-
order,
|
|
36240
|
-
value: value[key],
|
|
36241
|
-
key,
|
|
36242
|
-
path: `${props.path}.${key}`,
|
|
36243
|
-
level: props.level + 1,
|
|
36244
|
-
extraRight: ","
|
|
36245
|
-
}
|
|
36246
|
-
)),
|
|
36247
|
-
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
36248
|
-
"div",
|
|
36249
|
-
{
|
|
36250
|
-
className: css$1.property,
|
|
36251
|
-
style: {
|
|
36252
|
-
"--level": props.level,
|
|
36253
|
-
"--order": keys.length
|
|
36254
|
-
},
|
|
36255
|
-
children: [
|
|
36256
|
-
`}`,
|
|
36257
|
-
extraRight
|
|
36258
|
-
]
|
|
36259
|
-
},
|
|
36260
|
-
void 0,
|
|
36261
|
-
true,
|
|
36262
|
-
{
|
|
36263
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/property/object.tsx",
|
|
36264
|
-
lineNumber: 54,
|
|
36265
|
-
columnNumber: 11
|
|
36266
|
-
},
|
|
36267
|
-
void 0
|
|
36268
|
-
)
|
|
36269
|
-
] }, void 0, true, {
|
|
36270
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/property/object.tsx",
|
|
36271
|
-
lineNumber: 41,
|
|
36272
|
-
columnNumber: 9
|
|
36273
|
-
}, void 0)
|
|
36274
|
-
] }, void 0, true, {
|
|
36275
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/property/object.tsx",
|
|
36276
|
-
lineNumber: 16,
|
|
36277
|
-
columnNumber: 5
|
|
36278
|
-
}, void 0);
|
|
36279
|
-
});
|
|
36280
|
-
const PrimitiveProperty = observer((props) => {
|
|
36281
|
-
const { name, value, extraRight } = props;
|
|
36282
|
-
const primitiveType = typeof value;
|
|
36283
|
-
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
36284
|
-
"div",
|
|
36285
|
-
{
|
|
36286
|
-
className: cx(css$1.property, css$1.primitive, css$1[primitiveType]),
|
|
36287
|
-
style: { "--level": props.level, "--order": props.order },
|
|
36288
|
-
"data-fitted": props.isFitted,
|
|
36289
|
-
title: String(value),
|
|
36290
|
-
"data-depth": String().padEnd(props.level, "-"),
|
|
36291
|
-
children: [
|
|
36292
|
-
name === void 0 ? null : /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(jsxDevRuntimeExports.Fragment, { children: [
|
|
36293
|
-
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("span", { className: css$1.propertyName, children: name }, void 0, false, {
|
|
36294
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/property/primitive.tsx",
|
|
36295
|
-
lineNumber: 23,
|
|
36296
|
-
columnNumber: 11
|
|
36297
|
-
}, void 0),
|
|
36298
|
-
": "
|
|
36299
|
-
] }, void 0, true, {
|
|
36300
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/property/primitive.tsx",
|
|
36301
|
-
lineNumber: 22,
|
|
36302
|
-
columnNumber: 9
|
|
36303
|
-
}, void 0),
|
|
36304
|
-
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("span", { className: css$1.propertyValue, children: primitiveType === "symbol" ? `Symbol(${Symbol.keyFor(value) || ""})` : primitiveType === "string" ? `"${value}"` : `${value}` }, void 0, false, {
|
|
36305
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/property/primitive.tsx",
|
|
36306
|
-
lineNumber: 27,
|
|
36307
|
-
columnNumber: 7
|
|
36308
|
-
}, void 0),
|
|
36309
|
-
extraRight
|
|
36310
|
-
]
|
|
36311
|
-
},
|
|
36312
|
-
void 0,
|
|
36313
|
-
true,
|
|
36314
|
-
{
|
|
36315
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/property/primitive.tsx",
|
|
36316
|
-
lineNumber: 12,
|
|
36317
|
-
columnNumber: 5
|
|
36318
|
-
},
|
|
36319
|
-
void 0
|
|
36320
|
-
);
|
|
36321
|
-
});
|
|
36322
|
-
const Property = observer((rootProps) => {
|
|
36323
|
-
const { value } = rootProps;
|
|
36324
|
-
const valueType = Object.prototype.toString.call(value);
|
|
36325
|
-
const props = {
|
|
36326
|
-
...rootProps,
|
|
36327
|
-
value,
|
|
36328
|
-
valueType
|
|
36329
|
-
};
|
|
36330
|
-
if (Array.isArray(value)) {
|
|
36331
|
-
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(ArrayProperty, { ...props }, void 0, false, {
|
|
36332
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/property/index.tsx",
|
|
36333
|
-
lineNumber: 36,
|
|
36334
|
-
columnNumber: 12
|
|
36335
|
-
}, void 0);
|
|
36336
|
-
}
|
|
36337
|
-
if (_exports.isObject(value) && value.constructor?.name && value.constructor.name !== "Object") {
|
|
36338
|
-
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(InstanceProperty, { ...props }, void 0, false, {
|
|
36339
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/property/index.tsx",
|
|
36340
|
-
lineNumber: 44,
|
|
36341
|
-
columnNumber: 12
|
|
36342
|
-
}, void 0);
|
|
36343
|
-
} else if (_exports.isFunction(value)) {
|
|
36344
|
-
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(FunctionProperty, { ...props }, void 0, false, {
|
|
36345
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/property/index.tsx",
|
|
36346
|
-
lineNumber: 46,
|
|
36347
|
-
columnNumber: 12
|
|
36348
|
-
}, void 0);
|
|
36349
|
-
} else if (_exports.isObject(value)) {
|
|
36350
|
-
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(ObjectProperty, { ...props }, void 0, false, {
|
|
36351
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/property/index.tsx",
|
|
36352
|
-
lineNumber: 48,
|
|
36353
|
-
columnNumber: 12
|
|
36354
|
-
}, void 0);
|
|
36355
|
-
} else if (valueType.startsWith("[object ") && value && typeof value === "object" && "constructor" in value) {
|
|
36356
|
-
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(InstanceProperty, { ...props }, void 0, false, {
|
|
36357
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/property/index.tsx",
|
|
36358
|
-
lineNumber: 55,
|
|
36359
|
-
columnNumber: 12
|
|
36360
|
-
}, void 0);
|
|
36361
|
-
} else {
|
|
36362
|
-
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(PrimitiveProperty, { ...props }, void 0, false, {
|
|
36363
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/property/index.tsx",
|
|
36364
|
-
lineNumber: 57,
|
|
36365
|
-
columnNumber: 12
|
|
36366
|
-
}, void 0);
|
|
37576
|
+
);
|
|
36367
37577
|
}
|
|
36368
|
-
|
|
36369
|
-
const
|
|
36370
|
-
|
|
36371
|
-
|
|
36372
|
-
|
|
36373
|
-
|
|
36374
|
-
|
|
36375
|
-
|
|
36376
|
-
|
|
36377
|
-
"
|
|
36378
|
-
|
|
36379
|
-
|
|
36380
|
-
|
|
36381
|
-
|
|
36382
|
-
|
|
36383
|
-
|
|
36384
|
-
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
36385
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/
|
|
36386
|
-
lineNumber:
|
|
37578
|
+
);
|
|
37579
|
+
const PrimitiveProperty = observer(
|
|
37580
|
+
({ item }) => {
|
|
37581
|
+
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
37582
|
+
"div",
|
|
37583
|
+
{
|
|
37584
|
+
className: cx(css$2.property, css$2.primitive, css$2[item.dataType], {
|
|
37585
|
+
[css$2.null]: item.data === null
|
|
37586
|
+
}),
|
|
37587
|
+
style: { "--level": item.depth, "--order": item.order },
|
|
37588
|
+
"data-fitted": item.isFitted,
|
|
37589
|
+
title: String(item.data),
|
|
37590
|
+
onClick: (e) => item.devtools.handlePropertyClick(item, e),
|
|
37591
|
+
"data-depth": item.depthLine,
|
|
37592
|
+
children: [
|
|
37593
|
+
item.property === void 0 ? null : /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(jsxDevRuntimeExports.Fragment, { children: [
|
|
37594
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("span", { className: css$2.propertyName, children: item.property }, void 0, false, {
|
|
37595
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/propert-list-item-render/primitive.tsx",
|
|
37596
|
+
lineNumber: 24,
|
|
36387
37597
|
columnNumber: 13
|
|
36388
37598
|
}, void 0),
|
|
36389
|
-
|
|
36390
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/extras-item-render/index.tsx",
|
|
36391
|
-
lineNumber: 29,
|
|
36392
|
-
columnNumber: 13
|
|
36393
|
-
}, void 0)
|
|
37599
|
+
": "
|
|
36394
37600
|
] }, void 0, true, {
|
|
36395
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/
|
|
36396
|
-
lineNumber:
|
|
37601
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/propert-list-item-render/primitive.tsx",
|
|
37602
|
+
lineNumber: 23,
|
|
36397
37603
|
columnNumber: 11
|
|
36398
|
-
}, void 0)
|
|
36399
|
-
|
|
36400
|
-
|
|
36401
|
-
|
|
36402
|
-
|
|
36403
|
-
|
|
36404
|
-
|
|
36405
|
-
|
|
36406
|
-
|
|
36407
|
-
|
|
36408
|
-
|
|
36409
|
-
|
|
36410
|
-
|
|
36411
|
-
|
|
36412
|
-
|
|
36413
|
-
|
|
36414
|
-
|
|
36415
|
-
|
|
36416
|
-
isFitted: model.devtools.searchEngine.getSearchPropertyResult(
|
|
36417
|
-
{ type: "extras", item: extras },
|
|
36418
|
-
property2
|
|
36419
|
-
),
|
|
36420
|
-
level: depth + 1,
|
|
36421
|
-
path: property2
|
|
36422
|
-
},
|
|
36423
|
-
property2,
|
|
36424
|
-
false,
|
|
36425
|
-
{
|
|
36426
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/extras-item-render/index.tsx",
|
|
36427
|
-
lineNumber: 33,
|
|
36428
|
-
columnNumber: 11
|
|
36429
|
-
},
|
|
36430
|
-
void 0
|
|
36431
|
-
))
|
|
36432
|
-
] }, void 0, true, {
|
|
36433
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/extras-item-render/index.tsx",
|
|
36434
|
-
lineNumber: 20,
|
|
36435
|
-
columnNumber: 7
|
|
36436
|
-
}, void 0);
|
|
37604
|
+
}, void 0),
|
|
37605
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("span", { className: css$2.propertyValue, children: item.dataType === "symbol" ? `Symbol(${Symbol.keyFor(item.data) || ""})` : item.dataType === "string" ? `"${item.data}"` : `${item.data}` }, void 0, false, {
|
|
37606
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/propert-list-item-render/primitive.tsx",
|
|
37607
|
+
lineNumber: 28,
|
|
37608
|
+
columnNumber: 9
|
|
37609
|
+
}, void 0),
|
|
37610
|
+
item.extraContent
|
|
37611
|
+
]
|
|
37612
|
+
},
|
|
37613
|
+
void 0,
|
|
37614
|
+
true,
|
|
37615
|
+
{
|
|
37616
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/propert-list-item-render/primitive.tsx",
|
|
37617
|
+
lineNumber: 10,
|
|
37618
|
+
columnNumber: 7
|
|
37619
|
+
},
|
|
37620
|
+
void 0
|
|
37621
|
+
);
|
|
36437
37622
|
}
|
|
36438
37623
|
);
|
|
37624
|
+
const PropertyListItemRender = observer(
|
|
37625
|
+
(props) => {
|
|
37626
|
+
switch (props.item.type) {
|
|
37627
|
+
case "array":
|
|
37628
|
+
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(ArrayProperty, { ...props }, void 0, false, {
|
|
37629
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/propert-list-item-render/index.tsx",
|
|
37630
|
+
lineNumber: 18,
|
|
37631
|
+
columnNumber: 16
|
|
37632
|
+
}, void 0);
|
|
37633
|
+
case "function":
|
|
37634
|
+
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(FunctionProperty, { ...props }, void 0, false, {
|
|
37635
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/propert-list-item-render/index.tsx",
|
|
37636
|
+
lineNumber: 20,
|
|
37637
|
+
columnNumber: 16
|
|
37638
|
+
}, void 0);
|
|
37639
|
+
case "instance":
|
|
37640
|
+
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(InstanceProperty, { ...props }, void 0, false, {
|
|
37641
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/propert-list-item-render/index.tsx",
|
|
37642
|
+
lineNumber: 22,
|
|
37643
|
+
columnNumber: 16
|
|
37644
|
+
}, void 0);
|
|
37645
|
+
case "object":
|
|
37646
|
+
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(ObjectProperty, { ...props }, void 0, false, {
|
|
37647
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/propert-list-item-render/index.tsx",
|
|
37648
|
+
lineNumber: 24,
|
|
37649
|
+
columnNumber: 16
|
|
37650
|
+
}, void 0);
|
|
37651
|
+
case "primitive":
|
|
37652
|
+
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(PrimitiveProperty, { ...props }, void 0, false, {
|
|
37653
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/propert-list-item-render/index.tsx",
|
|
37654
|
+
lineNumber: 26,
|
|
37655
|
+
columnNumber: 16
|
|
37656
|
+
}, void 0);
|
|
37657
|
+
}
|
|
37658
|
+
}
|
|
37659
|
+
);
|
|
37660
|
+
const expandButton = "expandButton_B24E3";
|
|
37661
|
+
const expanded = "expanded_8-pD6";
|
|
37662
|
+
const disabled = "disabled_MBq1Q";
|
|
36439
37663
|
const vmContent = "vmContent_TIK57";
|
|
36440
37664
|
const vmContentHeader = "vmContentHeader_M1JNM";
|
|
36441
37665
|
const vmContentHeaderLogo = "vmContentHeaderLogo_FRJDO";
|
|
36442
37666
|
const vmContentHeaderTitle = "vmContentHeaderTitle_lYmde";
|
|
37667
|
+
const vmContentHeaderTitleText = "vmContentHeaderTitleText_RlIFH";
|
|
36443
37668
|
const vmContentControlPanel = "vmContentControlPanel_CgUN9";
|
|
36444
37669
|
const vmContentControlPanelActions = "vmContentControlPanelActions_lONbA";
|
|
36445
37670
|
const vmContentInput = "vmContentInput_29GM1";
|
|
36446
37671
|
const filled = "filled_6JZa0";
|
|
36447
|
-
const
|
|
36448
|
-
const
|
|
37672
|
+
const vmContentVirtualized = "vmContentVirtualized_lia62";
|
|
37673
|
+
const gradientBlur = "gradientBlur_-y-re";
|
|
37674
|
+
const css$1 = {
|
|
37675
|
+
expandButton,
|
|
37676
|
+
expanded,
|
|
37677
|
+
disabled,
|
|
36449
37678
|
vmContent,
|
|
36450
37679
|
vmContentHeader,
|
|
36451
37680
|
vmContentHeaderLogo,
|
|
36452
37681
|
vmContentHeaderTitle,
|
|
37682
|
+
vmContentHeaderTitleText,
|
|
36453
37683
|
vmContentControlPanel,
|
|
36454
37684
|
vmContentControlPanelActions,
|
|
36455
37685
|
vmContentInput,
|
|
36456
37686
|
filled,
|
|
36457
|
-
|
|
37687
|
+
vmContentVirtualized,
|
|
37688
|
+
gradientBlur
|
|
36458
37689
|
};
|
|
36459
|
-
const
|
|
36460
|
-
|
|
36461
|
-
|
|
36462
|
-
|
|
36463
|
-
|
|
36464
|
-
|
|
36465
|
-
|
|
36466
|
-
|
|
36467
|
-
|
|
36468
|
-
|
|
36469
|
-
|
|
36470
|
-
|
|
36471
|
-
|
|
36472
|
-
|
|
36473
|
-
|
|
36474
|
-
|
|
36475
|
-
|
|
36476
|
-
|
|
36477
|
-
|
|
36478
|
-
|
|
36479
|
-
|
|
36480
|
-
|
|
36481
|
-
|
|
36482
|
-
|
|
36483
|
-
|
|
36484
|
-
|
|
36485
|
-
|
|
36486
|
-
|
|
36487
|
-
|
|
36488
|
-
|
|
36489
|
-
|
|
36490
|
-
|
|
36491
|
-
|
|
36492
|
-
|
|
36493
|
-
|
|
36494
|
-
|
|
36495
|
-
|
|
36496
|
-
|
|
36497
|
-
|
|
36498
|
-
|
|
36499
|
-
|
|
36500
|
-
|
|
36501
|
-
|
|
36502
|
-
|
|
36503
|
-
|
|
36504
|
-
|
|
36505
|
-
|
|
36506
|
-
|
|
36507
|
-
|
|
36508
|
-
|
|
36509
|
-
|
|
36510
|
-
|
|
36511
|
-
|
|
36512
|
-
|
|
37690
|
+
const root = "root_Xsw1F";
|
|
37691
|
+
const treeItemHeader = "treeItemHeader_9gR6Q";
|
|
37692
|
+
const treeItemLabel = "treeItemLabel_eiMgP";
|
|
37693
|
+
const treeItemMetaText = "treeItemMetaText_cmfX0";
|
|
37694
|
+
const treeItem = "treeItem_sRXPA";
|
|
37695
|
+
const vmTreeItem = "vmTreeItem_t-7jc";
|
|
37696
|
+
const extraTreeItem = "extraTreeItem_z3KA1";
|
|
37697
|
+
const css = {
|
|
37698
|
+
root,
|
|
37699
|
+
treeItemHeader,
|
|
37700
|
+
treeItemLabel,
|
|
37701
|
+
treeItemMetaText,
|
|
37702
|
+
treeItem,
|
|
37703
|
+
vmTreeItem,
|
|
37704
|
+
extraTreeItem
|
|
37705
|
+
};
|
|
37706
|
+
const ExpandButton = ({
|
|
37707
|
+
expandable: expandable2,
|
|
37708
|
+
expanded: expanded2,
|
|
37709
|
+
onClick,
|
|
37710
|
+
disabled: disabled2,
|
|
37711
|
+
showIconAnyway
|
|
37712
|
+
}) => {
|
|
37713
|
+
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
37714
|
+
"span",
|
|
37715
|
+
{
|
|
37716
|
+
onClick,
|
|
37717
|
+
className: cx(css$1.expandButton, {
|
|
37718
|
+
[css$1.expandable]: expandable2,
|
|
37719
|
+
[css$1.expanded]: expanded2,
|
|
37720
|
+
[css$1.disabled]: disabled2
|
|
37721
|
+
}),
|
|
37722
|
+
children: (expandable2 || showIconAnyway) && /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(ChevronRight, {}, void 0, false, {
|
|
37723
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/expand-button.tsx",
|
|
37724
|
+
lineNumber: 27,
|
|
37725
|
+
columnNumber: 42
|
|
37726
|
+
}, void 0)
|
|
37727
|
+
},
|
|
37728
|
+
void 0,
|
|
37729
|
+
false,
|
|
37730
|
+
{
|
|
37731
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/expand-button.tsx",
|
|
37732
|
+
lineNumber: 19,
|
|
37733
|
+
columnNumber: 5
|
|
37734
|
+
},
|
|
37735
|
+
void 0
|
|
37736
|
+
);
|
|
37737
|
+
};
|
|
37738
|
+
const VmTreeItemRender = observer(({ item }) => {
|
|
37739
|
+
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
37740
|
+
"div",
|
|
37741
|
+
{
|
|
37742
|
+
className: cx(css.treeItem, css.vmTreeItem),
|
|
37743
|
+
"data-fitted": item.isFitted,
|
|
37744
|
+
"data-depth": item.depthLine,
|
|
37745
|
+
style: { "--level": item.depth },
|
|
37746
|
+
children: /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
37747
|
+
"header",
|
|
37748
|
+
{
|
|
37749
|
+
className: css.treeItemHeader,
|
|
37750
|
+
onClick: () => item.devtools.handleVmItemHeaderClick(item),
|
|
37751
|
+
children: [
|
|
37752
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
37753
|
+
ExpandButton,
|
|
37754
|
+
{
|
|
37755
|
+
showIconAnyway: item.devtools.presentationMode === "tree",
|
|
37756
|
+
expandable: item.devtools.isExpandable(item),
|
|
37757
|
+
expanded: item.isExpanded
|
|
37758
|
+
},
|
|
37759
|
+
void 0,
|
|
37760
|
+
false,
|
|
37761
|
+
{
|
|
37762
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/vm-tree-item-render/index.tsx",
|
|
37763
|
+
lineNumber: 20,
|
|
37764
|
+
columnNumber: 9
|
|
37765
|
+
},
|
|
37766
|
+
void 0
|
|
37767
|
+
),
|
|
37768
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("label", { className: css.treeItemLabel, title: item.displayName, children: item.displayName }, void 0, false, {
|
|
36513
37769
|
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/vm-tree-item-render/index.tsx",
|
|
36514
|
-
lineNumber:
|
|
36515
|
-
columnNumber:
|
|
36516
|
-
},
|
|
36517
|
-
void 0
|
|
36518
|
-
|
|
37770
|
+
lineNumber: 25,
|
|
37771
|
+
columnNumber: 9
|
|
37772
|
+
}, void 0),
|
|
37773
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("span", { className: css.treeItemMetaText, title: item.data.id, children: item.data.id }, void 0, false, {
|
|
37774
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/vm-tree-item-render/index.tsx",
|
|
37775
|
+
lineNumber: 28,
|
|
37776
|
+
columnNumber: 9
|
|
37777
|
+
}, void 0)
|
|
37778
|
+
]
|
|
36519
37779
|
},
|
|
36520
37780
|
void 0,
|
|
36521
|
-
|
|
36522
|
-
{
|
|
36523
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/vm-tree-item-render/index.tsx",
|
|
36524
|
-
lineNumber: 22,
|
|
36525
|
-
columnNumber: 9
|
|
36526
|
-
},
|
|
36527
|
-
void 0
|
|
36528
|
-
),
|
|
36529
|
-
vmItem.properties.map((property2, order, arr) => /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
36530
|
-
Property,
|
|
36531
|
-
{
|
|
36532
|
-
model,
|
|
36533
|
-
name: property2,
|
|
36534
|
-
order,
|
|
36535
|
-
value: vmItem.vm[property2],
|
|
36536
|
-
isFitted: model.devtools.searchEngine.getSearchPropertyResult(
|
|
36537
|
-
{ type: "vm", item: vmItem },
|
|
36538
|
-
property2
|
|
36539
|
-
),
|
|
36540
|
-
extraRight: order !== arr.length - 1 && `,`,
|
|
36541
|
-
level: vmItem.depth,
|
|
36542
|
-
path: property2
|
|
36543
|
-
},
|
|
36544
|
-
property2,
|
|
36545
|
-
false,
|
|
36546
|
-
{
|
|
36547
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/vm-tree-item-render/index.tsx",
|
|
36548
|
-
lineNumber: 48,
|
|
36549
|
-
columnNumber: 11
|
|
36550
|
-
},
|
|
36551
|
-
void 0
|
|
36552
|
-
)),
|
|
36553
|
-
isExpanded && vmItem.children.map((child) => /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
36554
|
-
VmTreeItemRender,
|
|
36555
|
-
{
|
|
36556
|
-
payload: { vmItem: child, devtools: model.devtools }
|
|
36557
|
-
},
|
|
36558
|
-
child.key,
|
|
36559
|
-
false,
|
|
37781
|
+
true,
|
|
36560
37782
|
{
|
|
36561
37783
|
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/vm-tree-item-render/index.tsx",
|
|
36562
|
-
lineNumber:
|
|
36563
|
-
columnNumber:
|
|
37784
|
+
lineNumber: 16,
|
|
37785
|
+
columnNumber: 7
|
|
36564
37786
|
},
|
|
36565
37787
|
void 0
|
|
36566
|
-
)
|
|
36567
|
-
|
|
37788
|
+
)
|
|
37789
|
+
},
|
|
37790
|
+
void 0,
|
|
37791
|
+
false,
|
|
37792
|
+
{
|
|
36568
37793
|
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/vm-tree-item-render/index.tsx",
|
|
36569
|
-
lineNumber:
|
|
36570
|
-
columnNumber:
|
|
36571
|
-
},
|
|
37794
|
+
lineNumber: 10,
|
|
37795
|
+
columnNumber: 5
|
|
37796
|
+
},
|
|
37797
|
+
void 0
|
|
37798
|
+
);
|
|
37799
|
+
});
|
|
37800
|
+
class ExtraListItem extends ListItem {
|
|
37801
|
+
get isFitted() {
|
|
37802
|
+
const { searchEngine } = this.devtools;
|
|
37803
|
+
if (!searchEngine.isActive) {
|
|
37804
|
+
return true;
|
|
37805
|
+
}
|
|
37806
|
+
const firstSegment = searchEngine.segments[0];
|
|
37807
|
+
const secondSegment = searchEngine.segments[1];
|
|
37808
|
+
let isFittedByName;
|
|
37809
|
+
if (secondSegment) {
|
|
37810
|
+
isFittedByName = this.searchData.name === firstSegment;
|
|
37811
|
+
} else {
|
|
37812
|
+
isFittedByName = this.searchData.name.startsWith(firstSegment);
|
|
37813
|
+
}
|
|
37814
|
+
return isFittedByName;
|
|
36572
37815
|
}
|
|
36573
|
-
)
|
|
36574
|
-
|
|
36575
|
-
|
|
36576
|
-
|
|
36577
|
-
|
|
36578
|
-
|
|
36579
|
-
|
|
36580
|
-
|
|
36581
|
-
|
|
36582
|
-
|
|
36583
|
-
|
|
36584
|
-
|
|
36585
|
-
|
|
36586
|
-
|
|
36587
|
-
|
|
36588
|
-
|
|
36589
|
-
|
|
36590
|
-
|
|
36591
|
-
|
|
36592
|
-
|
|
36593
|
-
|
|
36594
|
-
|
|
36595
|
-
|
|
36596
|
-
|
|
36597
|
-
|
|
36598
|
-
|
|
36599
|
-
|
|
36600
|
-
|
|
36601
|
-
|
|
36602
|
-
|
|
36603
|
-
|
|
36604
|
-
|
|
36605
|
-
|
|
36606
|
-
|
|
36607
|
-
|
|
36608
|
-
|
|
36609
|
-
|
|
36610
|
-
|
|
36611
|
-
|
|
36612
|
-
|
|
36613
|
-
|
|
36614
|
-
|
|
36615
|
-
|
|
36616
|
-
|
|
36617
|
-
|
|
36618
|
-
},
|
|
36619
|
-
{
|
|
36620
|
-
value: "list",
|
|
36621
|
-
icon: ListUl
|
|
36622
|
-
}
|
|
36623
|
-
],
|
|
36624
|
-
value: model.devtools.presentationMode
|
|
36625
|
-
},
|
|
36626
|
-
void 0,
|
|
36627
|
-
false,
|
|
36628
|
-
{
|
|
36629
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/index.tsx",
|
|
36630
|
-
lineNumber: 38,
|
|
36631
|
-
columnNumber: 13
|
|
36632
|
-
},
|
|
36633
|
-
void 0
|
|
36634
|
-
) }, void 0, false, {
|
|
36635
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/index.tsx",
|
|
36636
|
-
lineNumber: 37,
|
|
36637
|
-
columnNumber: 11
|
|
36638
|
-
}, void 0),
|
|
36639
|
-
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
36640
|
-
"div",
|
|
37816
|
+
get propertyListItems() {
|
|
37817
|
+
return Object.keys(this.data || {}).map((property2, order) => {
|
|
37818
|
+
return PropertyListItem.create(
|
|
37819
|
+
this.devtools,
|
|
37820
|
+
property2,
|
|
37821
|
+
property2,
|
|
37822
|
+
order,
|
|
37823
|
+
this
|
|
37824
|
+
);
|
|
37825
|
+
});
|
|
37826
|
+
}
|
|
37827
|
+
get children() {
|
|
37828
|
+
return [...this.propertyListItems];
|
|
37829
|
+
}
|
|
37830
|
+
get depth() {
|
|
37831
|
+
return 0;
|
|
37832
|
+
}
|
|
37833
|
+
searchData;
|
|
37834
|
+
displayName;
|
|
37835
|
+
constructor(devtools, extras) {
|
|
37836
|
+
const displayName = "Extras";
|
|
37837
|
+
const key = `extra$$$-${displayName}-`;
|
|
37838
|
+
super(devtools, key, extras, void 0, /* @__PURE__ */ new Map());
|
|
37839
|
+
this.displayName = displayName;
|
|
37840
|
+
this.searchData = {
|
|
37841
|
+
name: displayName.toLowerCase().trim()
|
|
37842
|
+
};
|
|
37843
|
+
computed.struct(this, "propertyListItems");
|
|
37844
|
+
makeObservable(this);
|
|
37845
|
+
untracked(() => {
|
|
37846
|
+
this.expand();
|
|
37847
|
+
});
|
|
37848
|
+
}
|
|
37849
|
+
}
|
|
37850
|
+
const ExtraTreeItemRender = observer(
|
|
37851
|
+
({ item }) => {
|
|
37852
|
+
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
37853
|
+
"div",
|
|
37854
|
+
{
|
|
37855
|
+
className: cx(css.treeItem, css.extraTreeItem),
|
|
37856
|
+
"data-fitted": item.isFitted,
|
|
37857
|
+
"data-depth": item.depthLine,
|
|
37858
|
+
style: { "--level": item.depth },
|
|
37859
|
+
children: /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
37860
|
+
"header",
|
|
36641
37861
|
{
|
|
36642
|
-
className:
|
|
37862
|
+
className: css.treeItemHeader,
|
|
36643
37863
|
children: [
|
|
36644
|
-
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(Magnifier, {}, void 0, false, {
|
|
36645
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/index.tsx",
|
|
36646
|
-
lineNumber: 56,
|
|
36647
|
-
columnNumber: 13
|
|
36648
|
-
}, void 0),
|
|
36649
37864
|
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
36650
|
-
|
|
37865
|
+
ExpandButton,
|
|
36651
37866
|
{
|
|
36652
|
-
|
|
36653
|
-
|
|
36654
|
-
|
|
37867
|
+
showIconAnyway: item.devtools.presentationMode === "tree",
|
|
37868
|
+
expandable: item.isExpandable,
|
|
37869
|
+
expanded: item.isExpanded
|
|
36655
37870
|
},
|
|
36656
37871
|
void 0,
|
|
36657
37872
|
false,
|
|
36658
37873
|
{
|
|
36659
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/index.tsx",
|
|
36660
|
-
lineNumber:
|
|
36661
|
-
columnNumber:
|
|
37874
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/extra-tree-item-render/index.tsx",
|
|
37875
|
+
lineNumber: 20,
|
|
37876
|
+
columnNumber: 11
|
|
36662
37877
|
},
|
|
36663
37878
|
void 0
|
|
36664
37879
|
),
|
|
36665
|
-
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("
|
|
36666
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/index.tsx",
|
|
36667
|
-
lineNumber:
|
|
36668
|
-
columnNumber:
|
|
36669
|
-
}, void 0) }, void 0, false, {
|
|
36670
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/index.tsx",
|
|
36671
|
-
lineNumber: 62,
|
|
36672
|
-
columnNumber: 13
|
|
37880
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("label", { className: css.treeItemLabel, title: item.displayName, children: item.displayName }, void 0, false, {
|
|
37881
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/extra-tree-item-render/index.tsx",
|
|
37882
|
+
lineNumber: 25,
|
|
37883
|
+
columnNumber: 11
|
|
36673
37884
|
}, void 0)
|
|
36674
37885
|
]
|
|
36675
37886
|
},
|
|
36676
37887
|
void 0,
|
|
36677
37888
|
true,
|
|
36678
37889
|
{
|
|
36679
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/index.tsx",
|
|
36680
|
-
lineNumber:
|
|
36681
|
-
columnNumber:
|
|
37890
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/extra-tree-item-render/index.tsx",
|
|
37891
|
+
lineNumber: 17,
|
|
37892
|
+
columnNumber: 9
|
|
36682
37893
|
},
|
|
36683
37894
|
void 0
|
|
36684
37895
|
)
|
|
36685
|
-
|
|
36686
|
-
|
|
36687
|
-
|
|
36688
|
-
|
|
36689
|
-
|
|
36690
|
-
|
|
36691
|
-
|
|
36692
|
-
|
|
36693
|
-
|
|
36694
|
-
|
|
36695
|
-
|
|
36696
|
-
|
|
36697
|
-
|
|
36698
|
-
|
|
36699
|
-
|
|
36700
|
-
|
|
36701
|
-
|
|
36702
|
-
|
|
36703
|
-
|
|
36704
|
-
|
|
37896
|
+
},
|
|
37897
|
+
void 0,
|
|
37898
|
+
false,
|
|
37899
|
+
{
|
|
37900
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/extra-tree-item-render/index.tsx",
|
|
37901
|
+
lineNumber: 11,
|
|
37902
|
+
columnNumber: 7
|
|
37903
|
+
},
|
|
37904
|
+
void 0
|
|
37905
|
+
);
|
|
37906
|
+
}
|
|
37907
|
+
);
|
|
37908
|
+
const VmDevtoolsContent = observer(
|
|
37909
|
+
({
|
|
37910
|
+
className,
|
|
37911
|
+
headerContent,
|
|
37912
|
+
...props
|
|
37913
|
+
}) => {
|
|
37914
|
+
const model = useViewModel();
|
|
37915
|
+
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
37916
|
+
"div",
|
|
37917
|
+
{
|
|
37918
|
+
...props,
|
|
37919
|
+
className: cx(css$1.vmContent, className),
|
|
37920
|
+
ref: model.contentRef,
|
|
37921
|
+
children: [
|
|
37922
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("header", { className: css$1.vmContentHeader, children: [
|
|
37923
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("div", { className: css$1.gradientBlur }, void 0, false, {
|
|
37924
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/index.tsx",
|
|
37925
|
+
lineNumber: 37,
|
|
37926
|
+
columnNumber: 11
|
|
37927
|
+
}, void 0),
|
|
37928
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("div", { className: css$1.vmContentHeaderTitle, children: [
|
|
37929
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
37930
|
+
"img",
|
|
37931
|
+
{
|
|
37932
|
+
className: css$1.vmContentHeaderLogo,
|
|
37933
|
+
src: model.devtools.logoUrl
|
|
37934
|
+
},
|
|
37935
|
+
void 0,
|
|
37936
|
+
false,
|
|
37937
|
+
{
|
|
37938
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/index.tsx",
|
|
37939
|
+
lineNumber: 39,
|
|
37940
|
+
columnNumber: 13
|
|
37941
|
+
},
|
|
37942
|
+
void 0
|
|
37943
|
+
),
|
|
37944
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("span", { className: css$1.vmContentHeaderTitleText, children: "mobx-view-model devtools" }, void 0, false, {
|
|
36705
37945
|
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/index.tsx",
|
|
36706
|
-
lineNumber:
|
|
37946
|
+
lineNumber: 43,
|
|
36707
37947
|
columnNumber: 13
|
|
36708
|
-
},
|
|
36709
|
-
|
|
36710
|
-
|
|
36711
|
-
|
|
36712
|
-
|
|
36713
|
-
|
|
36714
|
-
|
|
36715
|
-
|
|
36716
|
-
|
|
36717
|
-
|
|
36718
|
-
|
|
36719
|
-
|
|
36720
|
-
|
|
36721
|
-
|
|
37948
|
+
}, void 0),
|
|
37949
|
+
headerContent
|
|
37950
|
+
] }, void 0, true, {
|
|
37951
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/index.tsx",
|
|
37952
|
+
lineNumber: 38,
|
|
37953
|
+
columnNumber: 11
|
|
37954
|
+
}, void 0),
|
|
37955
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("div", { className: css$1.vmContentControlPanel, children: [
|
|
37956
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("div", { className: css$1.vmContentControlPanelActions, children: /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
37957
|
+
IconToggleButton,
|
|
37958
|
+
{
|
|
37959
|
+
onUpdate: model.devtools.handleChangePresentationMode,
|
|
37960
|
+
options: [
|
|
37961
|
+
{
|
|
37962
|
+
value: "tree",
|
|
37963
|
+
icon: FolderTree
|
|
37964
|
+
},
|
|
37965
|
+
{
|
|
37966
|
+
value: "list",
|
|
37967
|
+
icon: ListUl
|
|
37968
|
+
}
|
|
37969
|
+
],
|
|
37970
|
+
value: model.devtools.presentationMode
|
|
37971
|
+
},
|
|
37972
|
+
void 0,
|
|
37973
|
+
false,
|
|
37974
|
+
{
|
|
37975
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/index.tsx",
|
|
37976
|
+
lineNumber: 50,
|
|
37977
|
+
columnNumber: 15
|
|
37978
|
+
},
|
|
37979
|
+
void 0
|
|
37980
|
+
) }, void 0, false, {
|
|
36722
37981
|
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/index.tsx",
|
|
36723
|
-
lineNumber:
|
|
37982
|
+
lineNumber: 49,
|
|
36724
37983
|
columnNumber: 13
|
|
36725
|
-
},
|
|
36726
|
-
|
|
36727
|
-
|
|
36728
|
-
|
|
36729
|
-
|
|
36730
|
-
|
|
36731
|
-
|
|
36732
|
-
|
|
36733
|
-
|
|
36734
|
-
|
|
36735
|
-
|
|
36736
|
-
|
|
36737
|
-
|
|
36738
|
-
|
|
36739
|
-
|
|
36740
|
-
|
|
36741
|
-
|
|
36742
|
-
|
|
36743
|
-
|
|
37984
|
+
}, void 0),
|
|
37985
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
37986
|
+
"div",
|
|
37987
|
+
{
|
|
37988
|
+
className: `${css$1.vmContentInput} ${model.devtools.searchEngine.isActive && css$1.filled}`,
|
|
37989
|
+
children: [
|
|
37990
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(Magnifier, {}, void 0, false, {
|
|
37991
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/index.tsx",
|
|
37992
|
+
lineNumber: 68,
|
|
37993
|
+
columnNumber: 15
|
|
37994
|
+
}, void 0),
|
|
37995
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
37996
|
+
"input",
|
|
37997
|
+
{
|
|
37998
|
+
ref: model.devtools.searchEngine.searchInputRef,
|
|
37999
|
+
autoFocus: true,
|
|
38000
|
+
placeholder: "search by property path or ViewModel name"
|
|
38001
|
+
},
|
|
38002
|
+
void 0,
|
|
38003
|
+
false,
|
|
38004
|
+
{
|
|
38005
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/index.tsx",
|
|
38006
|
+
lineNumber: 69,
|
|
38007
|
+
columnNumber: 15
|
|
38008
|
+
},
|
|
38009
|
+
void 0
|
|
38010
|
+
),
|
|
38011
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("button", { onClick: model.devtools.searchEngine.resetSearch, children: /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(Xmark, {}, void 0, false, {
|
|
38012
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/index.tsx",
|
|
38013
|
+
lineNumber: 75,
|
|
38014
|
+
columnNumber: 17
|
|
38015
|
+
}, void 0) }, void 0, false, {
|
|
38016
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/index.tsx",
|
|
38017
|
+
lineNumber: 74,
|
|
38018
|
+
columnNumber: 15
|
|
38019
|
+
}, void 0)
|
|
38020
|
+
]
|
|
38021
|
+
},
|
|
38022
|
+
void 0,
|
|
38023
|
+
true,
|
|
38024
|
+
{
|
|
38025
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/index.tsx",
|
|
38026
|
+
lineNumber: 65,
|
|
38027
|
+
columnNumber: 13
|
|
38028
|
+
},
|
|
38029
|
+
void 0
|
|
38030
|
+
)
|
|
38031
|
+
] }, void 0, true, {
|
|
38032
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/index.tsx",
|
|
38033
|
+
lineNumber: 48,
|
|
38034
|
+
columnNumber: 11
|
|
38035
|
+
}, void 0)
|
|
38036
|
+
] }, void 0, true, {
|
|
38037
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/index.tsx",
|
|
38038
|
+
lineNumber: 36,
|
|
38039
|
+
columnNumber: 9
|
|
38040
|
+
}, void 0),
|
|
38041
|
+
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV("div", { className: css$1.vmContentVirtualized, children: /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
38042
|
+
te,
|
|
38043
|
+
{
|
|
38044
|
+
ref: model.devtools.scrollListRef,
|
|
38045
|
+
itemSize: 22,
|
|
38046
|
+
data: model.devtools.listItems,
|
|
38047
|
+
keepMounted: [0],
|
|
38048
|
+
children: (listItem) => {
|
|
38049
|
+
if (listItem instanceof VMListItem) {
|
|
38050
|
+
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(VmTreeItemRender, { item: listItem }, listItem.key, false, {
|
|
38051
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/index.tsx",
|
|
38052
|
+
lineNumber: 89,
|
|
38053
|
+
columnNumber: 24
|
|
38054
|
+
}, void 0);
|
|
38055
|
+
}
|
|
38056
|
+
if (listItem instanceof ExtraListItem) {
|
|
38057
|
+
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(ExtraTreeItemRender, { item: listItem }, listItem.key, false, {
|
|
38058
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/index.tsx",
|
|
38059
|
+
lineNumber: 92,
|
|
38060
|
+
columnNumber: 24
|
|
38061
|
+
}, void 0);
|
|
38062
|
+
}
|
|
38063
|
+
if (listItem instanceof PropertyListItem) {
|
|
38064
|
+
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
38065
|
+
PropertyListItemRender,
|
|
38066
|
+
{
|
|
38067
|
+
item: listItem
|
|
38068
|
+
},
|
|
38069
|
+
listItem.key,
|
|
38070
|
+
false,
|
|
38071
|
+
{
|
|
38072
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/index.tsx",
|
|
38073
|
+
lineNumber: 96,
|
|
38074
|
+
columnNumber: 19
|
|
38075
|
+
},
|
|
38076
|
+
void 0
|
|
38077
|
+
);
|
|
38078
|
+
}
|
|
38079
|
+
if (listItem instanceof MetaListItem) {
|
|
38080
|
+
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(MetaListItemRender, { item: listItem }, listItem.key, false, {
|
|
38081
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/index.tsx",
|
|
38082
|
+
lineNumber: 104,
|
|
38083
|
+
columnNumber: 19
|
|
38084
|
+
}, void 0);
|
|
38085
|
+
}
|
|
38086
|
+
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(jsxDevRuntimeExports.Fragment, {}, void 0, false, {
|
|
38087
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/index.tsx",
|
|
38088
|
+
lineNumber: 108,
|
|
38089
|
+
columnNumber: 22
|
|
38090
|
+
}, void 0);
|
|
38091
|
+
}
|
|
38092
|
+
},
|
|
38093
|
+
void 0,
|
|
38094
|
+
false,
|
|
38095
|
+
{
|
|
38096
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/index.tsx",
|
|
38097
|
+
lineNumber: 81,
|
|
38098
|
+
columnNumber: 11
|
|
38099
|
+
},
|
|
38100
|
+
void 0
|
|
38101
|
+
) }, void 0, false, {
|
|
38102
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/index.tsx",
|
|
38103
|
+
lineNumber: 80,
|
|
38104
|
+
columnNumber: 9
|
|
38105
|
+
}, void 0)
|
|
38106
|
+
]
|
|
38107
|
+
},
|
|
38108
|
+
void 0,
|
|
38109
|
+
true,
|
|
38110
|
+
{
|
|
38111
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-content/index.tsx",
|
|
38112
|
+
lineNumber: 31,
|
|
38113
|
+
columnNumber: 7
|
|
38114
|
+
},
|
|
38115
|
+
void 0
|
|
38116
|
+
);
|
|
36744
38117
|
}
|
|
36745
38118
|
);
|
|
36746
38119
|
const VmDevtoolsPopup = observer(() => {
|
|
@@ -36748,13 +38121,13 @@ const VmDevtoolsPopup = observer(() => {
|
|
|
36748
38121
|
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
36749
38122
|
VmDevtoolsContent,
|
|
36750
38123
|
{
|
|
36751
|
-
className: css$
|
|
36752
|
-
"data-position":
|
|
38124
|
+
className: css$4.vmPopup,
|
|
38125
|
+
"data-position": model.devtools.position,
|
|
36753
38126
|
headerContent: /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(
|
|
36754
38127
|
"button",
|
|
36755
38128
|
{
|
|
36756
|
-
className: css$
|
|
36757
|
-
onClick: model.
|
|
38129
|
+
className: css$4.closePopupButton,
|
|
38130
|
+
onClick: model.devtools.hidePopup,
|
|
36758
38131
|
children: /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(Xmark, {}, void 0, false, {
|
|
36759
38132
|
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-popup/index.tsx",
|
|
36760
38133
|
lineNumber: 20,
|
|
@@ -36781,24 +38154,34 @@ const VmDevtoolsPopup = observer(() => {
|
|
|
36781
38154
|
void 0
|
|
36782
38155
|
);
|
|
36783
38156
|
});
|
|
38157
|
+
class DevtoolsClientVM extends ViewModelImpl {
|
|
38158
|
+
devtools = this.payload.devtools;
|
|
38159
|
+
contentRef = createRef({
|
|
38160
|
+
meta: { scrollbar: null },
|
|
38161
|
+
onSet(node) {
|
|
38162
|
+
const scrollbar = new SimpleBar(node);
|
|
38163
|
+
this.meta = { scrollbar };
|
|
38164
|
+
}
|
|
38165
|
+
});
|
|
38166
|
+
}
|
|
36784
38167
|
const DevtoolsClient = withViewModel(DevtoolsClientVM, ({ model }) => {
|
|
36785
38168
|
return /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(ViewModelsProvider, { value: model.devtools.vmStore, children: /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(ActiveViewModelProvider, { value: model, children: [
|
|
36786
38169
|
/* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(VmDevtoolsButton, {}, void 0, false, {
|
|
36787
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-client.tsx",
|
|
38170
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-client/index.tsx",
|
|
36788
38171
|
lineNumber: 14,
|
|
36789
38172
|
columnNumber: 9
|
|
36790
38173
|
}, void 0),
|
|
36791
38174
|
model.devtools.isPopupOpened && model.devtools.displayType === "popup" && /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(VmDevtoolsPopup, {}, void 0, false, {
|
|
36792
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-client.tsx",
|
|
38175
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-client/index.tsx",
|
|
36793
38176
|
lineNumber: 16,
|
|
36794
38177
|
columnNumber: 53
|
|
36795
38178
|
}, void 0)
|
|
36796
38179
|
] }, void 0, true, {
|
|
36797
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-client.tsx",
|
|
38180
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-client/index.tsx",
|
|
36798
38181
|
lineNumber: 13,
|
|
36799
38182
|
columnNumber: 7
|
|
36800
38183
|
}, void 0) }, void 0, false, {
|
|
36801
|
-
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-client.tsx",
|
|
38184
|
+
fileName: "/home/js2me/projects/open-source/mobx-view-model-devtools/src/ui/devtools-client/index.tsx",
|
|
36802
38185
|
lineNumber: 12,
|
|
36803
38186
|
columnNumber: 5
|
|
36804
38187
|
}, void 0);
|
|
@@ -36831,8 +38214,10 @@ let KeyboardHandler$1 = class KeyboardHandler {
|
|
|
36831
38214
|
};
|
|
36832
38215
|
this.isActivated = !!(this.activateStrategy.type === "immidiately");
|
|
36833
38216
|
observable.ref(this, "isActivated");
|
|
38217
|
+
observable.ref(this, "localActions");
|
|
36834
38218
|
computed.struct(this, "actions");
|
|
36835
38219
|
action.bound(this, "handleKeyboardClick");
|
|
38220
|
+
action.bound(this, "setActions");
|
|
36836
38221
|
makeObservable(this);
|
|
36837
38222
|
if (this.activateStrategy.type === "element-focus") {
|
|
36838
38223
|
const ref = this.activateStrategy.ref;
|
|
@@ -36874,6 +38259,7 @@ let KeyboardHandler$1 = class KeyboardHandler {
|
|
|
36874
38259
|
}
|
|
36875
38260
|
abortController;
|
|
36876
38261
|
activateStrategy;
|
|
38262
|
+
localActions;
|
|
36877
38263
|
/**
|
|
36878
38264
|
* Is user using keyboard input
|
|
36879
38265
|
*/
|
|
@@ -36882,7 +38268,11 @@ let KeyboardHandler$1 = class KeyboardHandler {
|
|
|
36882
38268
|
* User actions
|
|
36883
38269
|
*/
|
|
36884
38270
|
get actions() {
|
|
36885
|
-
|
|
38271
|
+
const usingActions = this.localActions ?? this.config.actions;
|
|
38272
|
+
return callFunction(usingActions) ?? [];
|
|
38273
|
+
}
|
|
38274
|
+
setActions(actions) {
|
|
38275
|
+
this.localActions = actions;
|
|
36886
38276
|
}
|
|
36887
38277
|
activate = () => {
|
|
36888
38278
|
if (this.isActivated) {
|
|
@@ -36906,16 +38296,16 @@ let KeyboardHandler$1 = class KeyboardHandler {
|
|
|
36906
38296
|
if (!this.isActivated) {
|
|
36907
38297
|
return;
|
|
36908
38298
|
}
|
|
36909
|
-
for (
|
|
38299
|
+
for (let i = 0; i < this.actions.length; i++) {
|
|
38300
|
+
const action2 = this.actions[i];
|
|
36910
38301
|
const disabled2 = callFunction(action2.disabled);
|
|
36911
38302
|
if (disabled2) {
|
|
36912
38303
|
continue;
|
|
36913
38304
|
}
|
|
36914
|
-
for (
|
|
36915
|
-
const
|
|
36916
|
-
|
|
36917
|
-
|
|
36918
|
-
)) {
|
|
38305
|
+
for (let j = 0; j < action2.shortcuts.length; j++) {
|
|
38306
|
+
const shortcut = action2.shortcuts[j];
|
|
38307
|
+
const keys = shortcut.split("+");
|
|
38308
|
+
if (keys.every((key) => this.checkKey(event, key))) {
|
|
36919
38309
|
runInAction(() => {
|
|
36920
38310
|
action2.action(event);
|
|
36921
38311
|
});
|
|
@@ -36924,11 +38314,13 @@ let KeyboardHandler$1 = class KeyboardHandler {
|
|
|
36924
38314
|
}
|
|
36925
38315
|
}
|
|
36926
38316
|
}
|
|
36927
|
-
|
|
36928
|
-
if (
|
|
36929
|
-
if (
|
|
36930
|
-
if (
|
|
36931
|
-
|
|
38317
|
+
checkKey(event, key) {
|
|
38318
|
+
if (key === "Shift" && event.shiftKey) return true;
|
|
38319
|
+
if ((key === "Ctrl" || key === "Control") && event.ctrlKey) return true;
|
|
38320
|
+
if (key === "Alt" && event.altKey) return true;
|
|
38321
|
+
if ((key === "Windows" || key === "Meta" || key === "Command" || key === "⌘" || key === "Win") && event.metaKey)
|
|
38322
|
+
return true;
|
|
38323
|
+
return key === event.key || key === event.code;
|
|
36932
38324
|
}
|
|
36933
38325
|
destroy() {
|
|
36934
38326
|
this.abortController.abort();
|
|
@@ -36976,20 +38368,28 @@ class KeyboardHandler2 extends KeyboardHandler$1 {
|
|
|
36976
38368
|
},
|
|
36977
38369
|
{
|
|
36978
38370
|
shortcuts: ["Ctrl+ArrowDown", "PageDown"],
|
|
36979
|
-
action: () => {
|
|
38371
|
+
action: (e) => {
|
|
36980
38372
|
if (!devtools.scrollListRef.current) return;
|
|
36981
38373
|
devtools.scrollListRef.current.scrollTo(
|
|
36982
38374
|
devtools.scrollListRef.current.scrollOffset + 400
|
|
36983
38375
|
);
|
|
38376
|
+
if (devtools.searchEngine.searchInputRef.meta.focused) {
|
|
38377
|
+
e.stopPropagation();
|
|
38378
|
+
e.preventDefault();
|
|
38379
|
+
}
|
|
36984
38380
|
}
|
|
36985
38381
|
},
|
|
36986
38382
|
{
|
|
36987
38383
|
shortcuts: ["Ctrl+ArrowUp", "PageUp"],
|
|
36988
|
-
action: () => {
|
|
38384
|
+
action: (e) => {
|
|
36989
38385
|
if (!devtools.scrollListRef.current) return;
|
|
36990
38386
|
devtools.scrollListRef.current.scrollTo(
|
|
36991
38387
|
devtools.scrollListRef.current.scrollOffset - 400
|
|
36992
38388
|
);
|
|
38389
|
+
if (devtools.searchEngine.searchInputRef.meta.focused) {
|
|
38390
|
+
e.stopPropagation();
|
|
38391
|
+
e.preventDefault();
|
|
38392
|
+
}
|
|
36993
38393
|
}
|
|
36994
38394
|
}
|
|
36995
38395
|
]
|
|
@@ -37014,33 +38414,25 @@ class ViewModelStoreImpl extends ViewModelStoreBase {
|
|
|
37014
38414
|
}
|
|
37015
38415
|
}
|
|
37016
38416
|
const createFocusableRef = (cfg) => {
|
|
37017
|
-
const
|
|
37018
|
-
|
|
37019
|
-
|
|
37020
|
-
|
|
37021
|
-
|
|
37022
|
-
});
|
|
37023
|
-
let lastNode;
|
|
38417
|
+
const refreshFocused = () => {
|
|
38418
|
+
runInAction(() => {
|
|
38419
|
+
ref.meta.focused = document.activeElement === ref.current;
|
|
38420
|
+
});
|
|
38421
|
+
};
|
|
37024
38422
|
const ref = createRef({
|
|
37025
38423
|
meta: {
|
|
37026
38424
|
focused: false
|
|
37027
38425
|
},
|
|
37028
|
-
onSet: (
|
|
37029
|
-
|
|
37030
|
-
|
|
37031
|
-
|
|
37032
|
-
|
|
37033
|
-
}
|
|
37034
|
-
node.addEventListener("focus", handleFocus);
|
|
37035
|
-
node.addEventListener("blur", handleBlur);
|
|
37036
|
-
cfg?.onSet?.(node);
|
|
37037
|
-
lastNode = node;
|
|
38426
|
+
onSet: (curr, prev) => {
|
|
38427
|
+
refreshFocused();
|
|
38428
|
+
curr.addEventListener("focus", refreshFocused, true);
|
|
38429
|
+
curr.addEventListener("blur", refreshFocused, true);
|
|
38430
|
+
cfg?.onSet?.(curr, prev);
|
|
37038
38431
|
},
|
|
37039
|
-
onUnset: () => {
|
|
37040
|
-
cfg?.onUnset?.();
|
|
37041
|
-
|
|
37042
|
-
|
|
37043
|
-
lastNode = void 0;
|
|
38432
|
+
onUnset: (last) => {
|
|
38433
|
+
cfg?.onUnset?.(last);
|
|
38434
|
+
last?.removeEventListener("focus", refreshFocused, true);
|
|
38435
|
+
last?.removeEventListener("blur", refreshFocused, true);
|
|
37044
38436
|
}
|
|
37045
38437
|
});
|
|
37046
38438
|
return ref;
|
|
@@ -37052,105 +38444,9 @@ class SearchEngine {
|
|
|
37052
38444
|
formattedSearchText;
|
|
37053
38445
|
searchTextUpdateTimeout;
|
|
37054
38446
|
segments = [];
|
|
37055
|
-
get cache() {
|
|
37056
|
-
this.fittedVmIds.clear();
|
|
37057
|
-
this.formattedSearchText;
|
|
37058
|
-
return /* @__PURE__ */ new Map();
|
|
37059
|
-
}
|
|
37060
38447
|
get isActive() {
|
|
37061
38448
|
return !!this.formattedSearchText;
|
|
37062
38449
|
}
|
|
37063
|
-
defaultSearchResult = {
|
|
37064
|
-
isFitted: true,
|
|
37065
|
-
isFittedByName: true,
|
|
37066
|
-
fittedProperties: [],
|
|
37067
|
-
fittedPath: []
|
|
37068
|
-
};
|
|
37069
|
-
getSearchResult(input) {
|
|
37070
|
-
if (!this.isActive) {
|
|
37071
|
-
return this.defaultSearchResult;
|
|
37072
|
-
}
|
|
37073
|
-
if (input.type === "extras") {
|
|
37074
|
-
return this.defaultSearchResult;
|
|
37075
|
-
}
|
|
37076
|
-
const { item } = input;
|
|
37077
|
-
if (this.cache.has(item.key)) {
|
|
37078
|
-
return this.cache.get(item.key);
|
|
37079
|
-
}
|
|
37080
|
-
if (!this.segments.length) {
|
|
37081
|
-
return this.defaultSearchResult;
|
|
37082
|
-
}
|
|
37083
|
-
const isFittedByProperty = false;
|
|
37084
|
-
let fittedProperties = [];
|
|
37085
|
-
const firstSegment = this.segments[0];
|
|
37086
|
-
const secondSegment = this.segments[1];
|
|
37087
|
-
let propSegmentsToCheck = [];
|
|
37088
|
-
let isFittedById;
|
|
37089
|
-
let isFittedByName;
|
|
37090
|
-
let isFittedAllProperties;
|
|
37091
|
-
if (secondSegment) {
|
|
37092
|
-
isFittedById = item.searchData.id === firstSegment;
|
|
37093
|
-
isFittedByName = item.searchData.name === firstSegment;
|
|
37094
|
-
if (isFittedById || isFittedByName) {
|
|
37095
|
-
propSegmentsToCheck = [secondSegment];
|
|
37096
|
-
} else {
|
|
37097
|
-
propSegmentsToCheck = [firstSegment];
|
|
37098
|
-
}
|
|
37099
|
-
} else {
|
|
37100
|
-
isFittedById = item.searchData.id.startsWith(firstSegment);
|
|
37101
|
-
isFittedByName = item.searchData.name.startsWith(firstSegment);
|
|
37102
|
-
if (!isFittedById && !isFittedByName) {
|
|
37103
|
-
propSegmentsToCheck = [firstSegment];
|
|
37104
|
-
}
|
|
37105
|
-
}
|
|
37106
|
-
if (item.vm.id && isFittedById) {
|
|
37107
|
-
this.fittedVmIds.add(item.vm.id);
|
|
37108
|
-
}
|
|
37109
|
-
const isFittedByPropertyPath = false;
|
|
37110
|
-
let fullFittedProperty;
|
|
37111
|
-
if (propSegmentsToCheck.length) {
|
|
37112
|
-
item.properties.forEach((origProperty) => {
|
|
37113
|
-
const property2 = origProperty.toLowerCase();
|
|
37114
|
-
for (const segment of propSegmentsToCheck) {
|
|
37115
|
-
const isFullFitted = property2 === segment;
|
|
37116
|
-
if (isFullFitted) {
|
|
37117
|
-
fullFittedProperty = property2;
|
|
37118
|
-
fittedProperties.push(origProperty);
|
|
37119
|
-
return;
|
|
37120
|
-
}
|
|
37121
|
-
const isFittedProperty = !!segment && property2.startsWith(segment);
|
|
37122
|
-
if (isFittedProperty) {
|
|
37123
|
-
fittedProperties.push(origProperty);
|
|
37124
|
-
}
|
|
37125
|
-
}
|
|
37126
|
-
});
|
|
37127
|
-
} else {
|
|
37128
|
-
fittedProperties = item.properties;
|
|
37129
|
-
isFittedAllProperties = true;
|
|
37130
|
-
}
|
|
37131
|
-
const isFitted = isFittedByName || isFittedById || isFittedByProperty || isFittedByPropertyPath;
|
|
37132
|
-
this.cache.set(item.key, {
|
|
37133
|
-
isFitted,
|
|
37134
|
-
isFittedById,
|
|
37135
|
-
isFittedByName,
|
|
37136
|
-
isFittedByPropertyPath,
|
|
37137
|
-
fittedProperties,
|
|
37138
|
-
fullFittedProperty,
|
|
37139
|
-
isFittedAllProperties,
|
|
37140
|
-
fittedPath: this.segments
|
|
37141
|
-
});
|
|
37142
|
-
return this.cache.get(item.key);
|
|
37143
|
-
}
|
|
37144
|
-
getSearchPropertyResult(input, property2) {
|
|
37145
|
-
if (!this.isActive) {
|
|
37146
|
-
return true;
|
|
37147
|
-
}
|
|
37148
|
-
const searchResult = this.getSearchResult(input);
|
|
37149
|
-
if (input.type === "vm" && searchResult.isFittedAllProperties && input.item.vm.id && !this.fittedVmIds.has(input.item.vm.id)) {
|
|
37150
|
-
return false;
|
|
37151
|
-
}
|
|
37152
|
-
return searchResult.fittedProperties.includes(property2);
|
|
37153
|
-
}
|
|
37154
38450
|
setSearchText(searchText) {
|
|
37155
38451
|
this.rawSearchText = searchText;
|
|
37156
38452
|
this.formattedSearchText = searchText.toLowerCase().trim();
|
|
@@ -37158,7 +38454,6 @@ class SearchEngine {
|
|
|
37158
38454
|
if (!this.formattedSearchText) {
|
|
37159
38455
|
return;
|
|
37160
38456
|
}
|
|
37161
|
-
const segments = this.segments;
|
|
37162
38457
|
let startWithNextSegment = true;
|
|
37163
38458
|
for (let i = 0; i < searchText.length; ) {
|
|
37164
38459
|
const char = searchText[i];
|
|
@@ -37176,11 +38471,11 @@ class SearchEngine {
|
|
|
37176
38471
|
continue;
|
|
37177
38472
|
}
|
|
37178
38473
|
if (startWithNextSegment) {
|
|
37179
|
-
segments.push("");
|
|
38474
|
+
this.segments.push("");
|
|
37180
38475
|
startWithNextSegment = false;
|
|
37181
38476
|
}
|
|
37182
|
-
const lastIndex = segments.length - 1;
|
|
37183
|
-
segments[lastIndex] += char.toLowerCase();
|
|
38477
|
+
const lastIndex = this.segments.length - 1;
|
|
38478
|
+
this.segments[lastIndex] += char.toLowerCase();
|
|
37184
38479
|
i++;
|
|
37185
38480
|
}
|
|
37186
38481
|
}
|
|
@@ -37210,7 +38505,7 @@ class SearchEngine {
|
|
|
37210
38505
|
rawSearchText: observable.ref,
|
|
37211
38506
|
formattedSearchText: observable.ref,
|
|
37212
38507
|
isActive: computed,
|
|
37213
|
-
|
|
38508
|
+
segments: observable,
|
|
37214
38509
|
setSearchText: action.bound
|
|
37215
38510
|
});
|
|
37216
38511
|
}
|
|
@@ -37220,36 +38515,35 @@ class ViewModelDevtools {
|
|
|
37220
38515
|
this.config = config;
|
|
37221
38516
|
this.isPopupOpened = !!this.config.defaultIsOpened;
|
|
37222
38517
|
this.displayType = "popup";
|
|
38518
|
+
this.position = this.config.position ?? "top-right";
|
|
37223
38519
|
this.vmStore = new ViewModelStoreImpl();
|
|
37224
38520
|
this.setExtras(this.config.extras);
|
|
37225
38521
|
this.setStore(this.config.viewModels);
|
|
37226
|
-
this.expandedVmsMap = observable.map();
|
|
37227
38522
|
this.presentationMode = "tree";
|
|
37228
38523
|
this.expandedVmItemsPaths = observable.set();
|
|
37229
38524
|
this.logoUrl = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAMAAADW3miqAAACTFBMVEUvEQFCGQIuEQFAGALpZhjoZhlgJANAGALrZhiAMAR1KwNKHAJXIAM4FQFsKgWUNgL09PYvEQCgPARoJwNRHgL////U0dCoSRGSPgzFTQljKwl5MggjDQHm5ORWsU2JNATWWBC4SQxsMQysQAX6+vra2NbMUQtRJQxWLgu/SAXf3t62tLOyr6zCbTecSxmyQQLIxcDAvbqbmZaVeWeKc2WgRBB/OhCMOQu4QwPt7e/DuLCYz5NoOB2tqqdsaGVhW1NagUJtTjtkYCe8XyaRRRiHRRTi29XKyMfr0cG2p5yag3JfVElMR0GfcjBVMx/KWRnoYxXdXhRzQBB0OA3n6OrOzM2npKPLq5frs5TUpo2umounkHp3cm6mgWqBbGB8aVZzYVBXnktWT0eYY0BYZzOGazGmWi3IYid1QSOxTxZYSBQ6IBFFJA6lPAP/8uvR2s3qybbSwLW8q6G3nYigm4B8fHvxonW9kXWSjGhrgl5vZlpZqk+ZdE5cjE16fkzuh0q9eUetcUKAWEBpdj90bjg/PDfteDRZdTGwaS6sYCljVCl2TCflbCJZYSKlVSJfRh/dZB2OWR1nRhFfNRHO48zo1crjwamuv5SfqpSXtpGro4bEm4SMhoGFu3yQlHqFf3l5tHKtjHCFe2ageWLSimBnYFuue1hYlk1uikCCYT5XijqRWjdNPTLRcS5VVCC7WB3WYBtsTRYmHBNYPxLA3bzwv6LVsZ+4tJyQxYqHqHvVlnJzn2uegF39l1t1oEiKjzyAdjpeRDShaClCLR/JXT/FAAAABnRSTlP7uLgrtivDuZKUAAAElElEQVQ4yyWURXsbMRRFpyRF0vCM2a6ZmWPXYWqwTVKGMDRNUmZmZmZmZub+scrp3bzN+e65q8dMmQwBwqwKnLZTNrsVDW/Y8P3AgRJPKcK8ykHIMZOmMJMgAYAlimCwGQRsHdHpayOv2tsN4wJmIZTMEiSTGMgRQoCC/B5ZAYIu/fylIthsBlkAHCeZKaNChuE4yKkA2w2IAKtdhyNpWY76ZUwkFZkIUFmeNTPU6vUadSMOOg2htNWURRhRkwQBr9OlHXQNYTipbVHZ6tX5JiPGKgsgUBQWUgckMDX/woIFC+uwzEhcWz43J6ANVgEC+dpIrcJyEp8+MeR4k4hpz696PyTIdBMZ+jAv0RBqGXPUZkw1YT0AEtCFw/3NiVgiVbWMR5hCJnnZs5uB+PoeB4pk9OFaoM9adTVDXeXzGm7+9fI8AIwEsiwBV12BYIWZmCL6DIBGozGt8+6vCLmbOp8e0vF0uMKzrH7hnHii3GyGpgjiOcLr9QDubwlaFj3d9oD6GcIqQM1enVO25FobqD1x2IQIp/KAjPUtabCs7e/fHR7hGQAUDqKN4rz9fb/XrJrf76gzcuqexsY91xJaS2Pq7oNdNVaGZ4kElaWituXNaF50b3p8uoN451m02y6VaS1rkksXbwybGMJBSMBSSy5YPtqUs6zbse816HHn8jsuB91zGpNNi2/vyjAsYGmSWm080VblFj9WV589eylnSR7ZnHDnGrvvbNq2K8JgwALCJhtCFVsKjnwgftLnexsKxE4uHyiPB9ZV79s3uHuYwbSKA3e1oeYWn3GxO17lW34kblnke7F5SVCb8lUf6aibxSgYEAhS2mDfs1GuKqa98WLghltb5Tv+dX1obtdY5YBD384gpAIWbmkI9TR7Ve+awMrNe1eK1Hbw1voQbTr46PSrEsaOAVak+7F8d/OYz5sMiJc/uzQXB45Xfpo719L0tvrn85ISxmYFkFe7YmXdPaNecHSueO6cRrzV++TJDFF0rVt+pvVYEbIDs0RS2rKKLW2s0bgoJ7o077ZunT59hkajuXKm82XJBKRAs5R0l/VVnOWNxscB0eW63jt9AnJd6ch6JiCnwkJzyhJqqSjwDkdHXnSt3P7wPyQuNgkTkB1jOryrPth8v+Do7Oz8Vl+/6eD2CZ1LXKsXxtsp5EQAQph0B8vLl2FTpq7u6NEzxysfFiHRchsjq392CQN4IJkLa93xJd0Zkykbqct0vK6urOwtNlmWYgVFKQQh6yvsnl8fu0OLsD4dOXF6cO/eyu2910WNuGDnvfApqlPUwoYFq2bWr97D026driZ8uHVw8NeORz8uipoVK1wrdhZ1oHDvy8KF8zfqMUZpnW54uKbm8KFDf1pbWy+cn0lThFSWEG/WaOQF2SrbnbJ9Fo3H4xnJoKzDaNJTG90kQcIKCAAcLaVxGuz0B/k9HpssOJ0I20uKEGOGHCsIPAAoGnU6x52lfkPU7zfMNsjRUsFqmIAmmzmJIISBCpAgO6OCMC7T47H5BdqP2ikzlb5DxswBjAAhvFX2+2UrRgIyHDtwzGMoFexFZto/HbAJBdFwHOYAAAAASUVORK5CYII=";
|
|
37230
|
-
this.inputRef = createFocusableRef();
|
|
37231
38525
|
this.scrollContentRef = createRef();
|
|
37232
38526
|
this.scrollListRef = createRef();
|
|
37233
38527
|
this.keyboardHandler = new KeyboardHandler2(this);
|
|
37234
38528
|
this.searchEngine = new SearchEngine();
|
|
37235
38529
|
makeObservable(this, {
|
|
38530
|
+
position: observable.ref,
|
|
37236
38531
|
isPopupOpened: observable.ref,
|
|
37237
38532
|
projectVmStore: observable.ref,
|
|
37238
38533
|
presentationMode: observable.ref,
|
|
37239
38534
|
extras: observable.ref,
|
|
37240
|
-
setStore: action,
|
|
37241
|
-
setExtras: action,
|
|
37242
|
-
showPopup: action,
|
|
37243
|
-
hidePopup: action,
|
|
37244
|
-
handleChangePresentationMode: action,
|
|
37245
|
-
handleExpandVmPropertyClick: action,
|
|
37246
|
-
expandAllVMs: action,
|
|
37247
|
-
collapseAllVms: action,
|
|
37248
|
-
handleExpandExtraPropertyClick: action,
|
|
37249
|
-
allVms: computed.struct,
|
|
38535
|
+
setStore: action.bound,
|
|
38536
|
+
setExtras: action.bound,
|
|
38537
|
+
showPopup: action.bound,
|
|
38538
|
+
hidePopup: action.bound,
|
|
38539
|
+
handleChangePresentationMode: action.bound,
|
|
38540
|
+
handleExpandVmPropertyClick: action.bound,
|
|
38541
|
+
expandAllVMs: action.bound,
|
|
38542
|
+
collapseAllVms: action.bound,
|
|
38543
|
+
handleExpandExtraPropertyClick: action.bound,
|
|
37250
38544
|
isActive: computed,
|
|
37251
|
-
|
|
37252
|
-
|
|
38545
|
+
rootVmListItems: computed.struct,
|
|
38546
|
+
extraListItems: computed.struct
|
|
37253
38547
|
});
|
|
37254
38548
|
this.render();
|
|
37255
38549
|
}
|
|
@@ -37260,13 +38554,13 @@ class ViewModelDevtools {
|
|
|
37260
38554
|
extras;
|
|
37261
38555
|
expandedVmItemsPaths;
|
|
37262
38556
|
logoUrl;
|
|
37263
|
-
inputRef;
|
|
37264
38557
|
scrollContentRef;
|
|
37265
38558
|
keyboardHandler;
|
|
37266
38559
|
searchEngine;
|
|
37267
38560
|
presentationMode;
|
|
37268
|
-
|
|
38561
|
+
position;
|
|
37269
38562
|
scrollListRef;
|
|
38563
|
+
anyCache = observable.map();
|
|
37270
38564
|
autoscrollTimeout;
|
|
37271
38565
|
get allVms() {
|
|
37272
38566
|
const vmStore = this.projectVmStore;
|
|
@@ -37275,65 +38569,23 @@ class ViewModelDevtools {
|
|
|
37275
38569
|
(vm) => !ViewModelImpl.isPrototypeOf(vm.constructor)
|
|
37276
38570
|
);
|
|
37277
38571
|
}
|
|
37278
|
-
get
|
|
38572
|
+
get rootVmListItems() {
|
|
37279
38573
|
return this.allVms.filter((vm) => {
|
|
37280
38574
|
const vmParams = this.getVmParams(vm);
|
|
37281
38575
|
return !vmParams || vmParams.parentViewModel == null;
|
|
37282
|
-
});
|
|
38576
|
+
}).map((vm) => new VMListItem(this, vm, this.allVms));
|
|
37283
38577
|
}
|
|
37284
|
-
get
|
|
37285
|
-
|
|
37286
|
-
|
|
37287
|
-
|
|
37288
|
-
|
|
37289
|
-
const alreadyExistVmTreeItem = flatten.find((it) => it.vm === vm);
|
|
37290
|
-
if (alreadyExistVmTreeItem) {
|
|
37291
|
-
return alreadyExistVmTreeItem;
|
|
37292
|
-
}
|
|
37293
|
-
const vmParams = this.getVmParams(vm);
|
|
37294
|
-
const parentVm = vmParams?.parentViewModel || null;
|
|
37295
|
-
const displayName = vm.constructor.name;
|
|
37296
|
-
const treeItem2 = {
|
|
37297
|
-
parent: parentVm ? createTreeItem(parentVm, depth - 1) : null,
|
|
37298
|
-
vm,
|
|
37299
|
-
displayName,
|
|
37300
|
-
children: [],
|
|
37301
|
-
depth,
|
|
37302
|
-
key: `${displayName}-${vm.id}-${depth}`,
|
|
37303
|
-
properties: getAllKeys(vm),
|
|
37304
|
-
searchData: {
|
|
37305
|
-
name: displayName.toLowerCase().trim(),
|
|
37306
|
-
id: (vm.id || "").toLowerCase().trim()
|
|
37307
|
-
}
|
|
37308
|
-
};
|
|
37309
|
-
untracked(() => {
|
|
37310
|
-
if (!this.expandedVmsMap.has(treeItem2.key)) {
|
|
37311
|
-
runInAction(() => {
|
|
37312
|
-
this.expandedVmsMap.set(treeItem2.key, true);
|
|
37313
|
-
});
|
|
37314
|
-
}
|
|
37315
|
-
});
|
|
37316
|
-
flatten.push(treeItem2);
|
|
37317
|
-
const collectedChildren = this.allVms.filter((maybeChildVm) => {
|
|
37318
|
-
const params = this.getVmParams(maybeChildVm);
|
|
37319
|
-
return params?.parentViewModel && params.parentViewModel === vm;
|
|
37320
|
-
}).map((childVm) => createTreeItem(childVm, depth + 1)).filter((it) => Boolean(it));
|
|
37321
|
-
treeItem2.children.push(...collectedChildren);
|
|
37322
|
-
return treeItem2;
|
|
37323
|
-
};
|
|
37324
|
-
this.rootVms.forEach((vm) => {
|
|
37325
|
-
const item = createTreeItem(vm, 0);
|
|
37326
|
-
if (item) {
|
|
37327
|
-
tree.push(item);
|
|
37328
|
-
}
|
|
37329
|
-
});
|
|
37330
|
-
return {
|
|
37331
|
-
flatten,
|
|
37332
|
-
tree
|
|
37333
|
-
};
|
|
38578
|
+
get extraListItems() {
|
|
38579
|
+
if (!this.extras) {
|
|
38580
|
+
return [];
|
|
38581
|
+
}
|
|
38582
|
+
return [new ExtraListItem(this, this.extras)];
|
|
37334
38583
|
}
|
|
37335
|
-
get
|
|
37336
|
-
return
|
|
38584
|
+
get listItems() {
|
|
38585
|
+
return [
|
|
38586
|
+
...this.rootVmListItems.flatMap((it) => it.expandedChildrenWithSelf),
|
|
38587
|
+
...this.extraListItems.flatMap((it) => it.expandedChildrenWithSelf)
|
|
38588
|
+
];
|
|
37337
38589
|
}
|
|
37338
38590
|
get isActive() {
|
|
37339
38591
|
return !!this.projectVmStore || Object.keys(this.extras || {}).length > 0;
|
|
@@ -37342,25 +38594,7 @@ class ViewModelDevtools {
|
|
|
37342
38594
|
return this.config.containerId ?? "view-model-devtools";
|
|
37343
38595
|
}
|
|
37344
38596
|
isExpanded(vmItem) {
|
|
37345
|
-
return
|
|
37346
|
-
}
|
|
37347
|
-
checkIsVmPathExpanded(vmItem, path) {
|
|
37348
|
-
const searchResult = this.searchEngine.getSearchResult({
|
|
37349
|
-
item: vmItem,
|
|
37350
|
-
type: "vm"
|
|
37351
|
-
});
|
|
37352
|
-
if (searchResult.fittedPath.length) {
|
|
37353
|
-
if (searchResult.isFittedById || searchResult.isFittedByName) {
|
|
37354
|
-
if (searchResult.fittedPath.slice(1).join(".").startsWith(path.toLowerCase())) {
|
|
37355
|
-
return true;
|
|
37356
|
-
}
|
|
37357
|
-
} else {
|
|
37358
|
-
if (searchResult.fittedPath.join(".").startsWith(path.toLowerCase())) {
|
|
37359
|
-
return true;
|
|
37360
|
-
}
|
|
37361
|
-
}
|
|
37362
|
-
}
|
|
37363
|
-
return this.expandedVmItemsPaths.has(`${vmItem.key}%%%${path}`);
|
|
38597
|
+
return vmItem.isExpanded || this.searchEngine.isActive;
|
|
37364
38598
|
}
|
|
37365
38599
|
checkIsExtraPathExpanded(path) {
|
|
37366
38600
|
const expandedKey = `__EXTRA__%%%${path}`;
|
|
@@ -37374,6 +38608,9 @@ class ViewModelDevtools {
|
|
|
37374
38608
|
this.expandedVmItemsPaths.add(expandedKey);
|
|
37375
38609
|
}
|
|
37376
38610
|
}
|
|
38611
|
+
handlePropertyClick(item, e) {
|
|
38612
|
+
item.toggleExpand();
|
|
38613
|
+
}
|
|
37377
38614
|
handleExpandExtraPropertyClick(path) {
|
|
37378
38615
|
const expandedKey = `__EXTRA__%%%${path}`;
|
|
37379
38616
|
if (this.expandedVmItemsPaths.has(expandedKey)) {
|
|
@@ -37383,10 +38620,10 @@ class ViewModelDevtools {
|
|
|
37383
38620
|
}
|
|
37384
38621
|
}
|
|
37385
38622
|
handleVmItemHeaderClick(vmItem) {
|
|
37386
|
-
|
|
38623
|
+
vmItem.toggleExpand();
|
|
37387
38624
|
}
|
|
37388
38625
|
isExpandable(vmItem) {
|
|
37389
|
-
return vmItem.
|
|
38626
|
+
return vmItem.isExpandable && this.presentationMode !== "list";
|
|
37390
38627
|
}
|
|
37391
38628
|
getVmParams(vm) {
|
|
37392
38629
|
if ("vmParams" in vm) {
|
|
@@ -37403,15 +38640,10 @@ class ViewModelDevtools {
|
|
|
37403
38640
|
handleChangePresentationMode = (mode) => {
|
|
37404
38641
|
this.presentationMode = mode === "list" ? "list" : "tree";
|
|
37405
38642
|
this.expandedVmItemsPaths.clear();
|
|
37406
|
-
this.expandedVmsMap.clear();
|
|
37407
38643
|
};
|
|
37408
38644
|
expandAllVMs() {
|
|
37409
|
-
this.expandedVmsMap.replace(
|
|
37410
|
-
this.vmsData.flatten.map((it) => [it.key, true])
|
|
37411
|
-
);
|
|
37412
38645
|
}
|
|
37413
38646
|
collapseAllVms() {
|
|
37414
|
-
this.expandedVmsMap.clear();
|
|
37415
38647
|
}
|
|
37416
38648
|
showPopup() {
|
|
37417
38649
|
this.isPopupOpened = true;
|
|
@@ -37421,6 +38653,10 @@ class ViewModelDevtools {
|
|
|
37421
38653
|
this.isPopupOpened = false;
|
|
37422
38654
|
}
|
|
37423
38655
|
init() {
|
|
38656
|
+
if (this.isInitialized) {
|
|
38657
|
+
return;
|
|
38658
|
+
}
|
|
38659
|
+
this.isInitialized = true;
|
|
37424
38660
|
reaction(
|
|
37425
38661
|
() => this.searchEngine.formattedSearchText,
|
|
37426
38662
|
() => {
|
|
@@ -37430,8 +38666,8 @@ class ViewModelDevtools {
|
|
|
37430
38666
|
this.scrollListRef.current?.scrollTo(0);
|
|
37431
38667
|
return;
|
|
37432
38668
|
}
|
|
38669
|
+
let nextOffset = 0;
|
|
37433
38670
|
let maxLevel = 0;
|
|
37434
|
-
let lastFoundElementIndex;
|
|
37435
38671
|
const htmlCollection = document.querySelectorAll(
|
|
37436
38672
|
`#${this.containerId} [data-fitted]`
|
|
37437
38673
|
);
|
|
@@ -37439,42 +38675,41 @@ class ViewModelDevtools {
|
|
|
37439
38675
|
(element, index) => {
|
|
37440
38676
|
if (element.dataset.fitted === "true" && element.dataset.depth && element.dataset.depth.length >= maxLevel) {
|
|
37441
38677
|
maxLevel = element.dataset.depth.length;
|
|
37442
|
-
|
|
38678
|
+
nextOffset = this.scrollListRef.current?.getItemOffset(index) ?? 0;
|
|
37443
38679
|
}
|
|
37444
38680
|
}
|
|
37445
38681
|
);
|
|
37446
|
-
|
|
37447
|
-
this.scrollListRef.current?.scrollTo(90);
|
|
37448
|
-
} else {
|
|
37449
|
-
this.scrollListRef.current?.scrollToIndex(lastFoundElementIndex, {
|
|
37450
|
-
align: "center",
|
|
37451
|
-
offset: -65,
|
|
37452
|
-
smooth: true
|
|
37453
|
-
});
|
|
37454
|
-
}
|
|
38682
|
+
this.scrollListRef.current?.scrollTo(nextOffset);
|
|
37455
38683
|
}, 200);
|
|
37456
38684
|
}
|
|
37457
38685
|
);
|
|
37458
38686
|
}
|
|
38687
|
+
isInitialized = false;
|
|
37459
38688
|
render() {
|
|
37460
38689
|
let container = document.querySelector(
|
|
37461
38690
|
`#${this.containerId}`
|
|
37462
38691
|
);
|
|
37463
38692
|
if (!container) {
|
|
37464
38693
|
container = document.createElement("div");
|
|
37465
|
-
container.className = css
|
|
38694
|
+
container.className = css.root;
|
|
37466
38695
|
container.id = this.containerId;
|
|
37467
38696
|
if (document.body) {
|
|
37468
38697
|
document.body.appendChild(container);
|
|
38698
|
+
const root2 = clientExports.createRoot(container);
|
|
38699
|
+
root2.render(
|
|
38700
|
+
reactExports.createElement(DevtoolsClient, { payload: { devtools: this } })
|
|
38701
|
+
);
|
|
37469
38702
|
} else {
|
|
37470
38703
|
document.addEventListener("DOMContentLoaded", () => {
|
|
37471
38704
|
document.body.appendChild(container);
|
|
38705
|
+
const root2 = clientExports.createRoot(container);
|
|
38706
|
+
root2.render(
|
|
38707
|
+
reactExports.createElement(DevtoolsClient, { payload: { devtools: this } })
|
|
38708
|
+
);
|
|
37472
38709
|
});
|
|
37473
38710
|
}
|
|
37474
|
-
this.init();
|
|
37475
38711
|
}
|
|
37476
|
-
|
|
37477
|
-
root2.render(reactExports.createElement(DevtoolsClient, { payload: { devtools: this } }));
|
|
38712
|
+
this.init();
|
|
37478
38713
|
}
|
|
37479
38714
|
static _instance = null;
|
|
37480
38715
|
static define(config) {
|